This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pitrou
Recipients chris.jerdonek, ethan.furman, gward, jcea, pitrou, twouters
Date 2012-08-03.21:28:29
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1344029158.3377.17.camel@localhost.localdomain>
In-reply-to <>
> Really.
> --> ''.split('\n')
> ['']

You claimed that an empty list is not a list of lines. I countered that
splitlines(), which *by definition* returns a list of lines, can return
an empty list, therefore textwrap.wrap() is not exotic in its behaviour.
Whether or not split() behaves differently is irrelevant.

> So if you have code that loops over the return and prints it out:
> for line in wrap(blah):
>      print(line)
> you will have different output with [] than with [''].

Indeed, which is a good reason *not* to change textwrap.wrap's
behaviour. The current behaviour is as reasonable as any other, and
changing it would break compatibility.
Date User Action Args
2012-08-03 21:28:30pitrousetrecipients: + pitrou, twouters, gward, jcea, chris.jerdonek, ethan.furman
2012-08-03 21:28:29pitroulinkissue15510 messages
2012-08-03 21:28:29pitroucreate