[Zope] Different field conversion for lines and ulines : why?

Pascal Peregrina Pperegrina at Lastminute.com
Thu Jan 11 05:23:45 EST 2007


Hi,

I would like to know why lines fields are not converted with the same logic
as ulines fields in Zpublisher.Converters.

lines uses splitlines() while ulines uses split('\n')

This gives different result:
>>> ''.splitlines()
[]
>>> ''.split('\n')
['']
>>> u''.splitlines()
[]
>>> u''.split('\n')
[u'']

So, when creating an empty Zope property for example, ulines version value
will be (u'',) while lines version value will be ()

Thanks.

Pascal


More information about the Zope mailing list