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 pitrou
Date 2008-01-29.23:53:34
SpamBayes Score 0.54753685
Marked as misclassified No
Message-id <1201650815.76.0.106888653852.issue1969@psf.upfronthosting.co.za>
In-reply-to
Content
In the bytearray type, the split and rsplit methods use a different
definition of what is a whitespace character. split_whitespace calls
ISSPACE(), while rsplit_whitespace calls Py_UNICODE_ISSPACE(). The
latter is probably an error since it is also inconsistent with behaviour
of the bytes type:

>>> s = b"\x09\x0A\x0B\x0C\x0D\x1C\x1D\x1E\x1F"
>>> s.split()
[b'\x1c\x1d\x1e\x1f']
>>> s.rsplit()
[b'\x1c\x1d\x1e\x1f']
>>> b = bytearray(s)
>>> b.split()
[bytearray(b'\x1c\x1d\x1e\x1f')]
>>> b.rsplit()
[]
History
Date User Action Args
2008-01-29 23:53:35pitrousetspambayes_score: 0.547537 -> 0.54753685
recipients: + pitrou
2008-01-29 23:53:35pitrousetspambayes_score: 0.547537 -> 0.547537
messageid: <1201650815.76.0.106888653852.issue1969@psf.upfronthosting.co.za>
2008-01-29 23:53:34pitroulinkissue1969 messages
2008-01-29 23:53:34pitroucreate