J
Jan Burgy
Hi everyone,
can somebody tell me why (using Python 2.3.2)
['foo\n\nbar\n\nbaz']
? Being used to Perl semantics, I expect
['foo\n', 'bar\n', 'baz']
or something equivalent without the '\n' characters in the result
strings. I have found that
['foo\n', 'bar\n', 'baz']
I prefer the first version however because my intent is stated more
clearly. Could this be a bug in sre.py (I looked at the code for a
good two minutes but then my head started hurting)
Thanks for your help,
Jan
can somebody tell me why (using Python 2.3.2)
['foo\n\nbar\n\nbaz']
? Being used to Perl semantics, I expect
['foo\n', 'bar\n', 'baz']
or something equivalent without the '\n' characters in the result
strings. I have found that
['foo\n', 'bar\n', 'baz']
I prefer the first version however because my intent is stated more
clearly. Could this be a bug in sre.py (I looked at the code for a
good two minutes but then my head started hurting)
Thanks for your help,
Jan