[Zope] empty lines property value
Dieter Maurer
dieter@handshake.de
Mon, 26 Feb 2001 23:24:16 +0100 (CET)
zope@concision.com writes:
> I just noticed that a property of type "lines", when created via the
> management interface (if not by other means as well) has as its
> initial value ['']. I would have expected an empty "lines" property to
> have the value []. Does anyone know the rationale behind this? Or
> should it be considered a bug? I see this behavior in both of the
> versions of Zope that we run locally -- 2.2.4 and 2.3.1b1.
It's an implementation artifact:
Python's "string.split('','\n')" returns "['']", as is probably
correct as "string.split('a','\n')" should return "['a']".
Dieter