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 flox, pitrou
Date 2010-01-03.18:13:42
SpamBayes Score 0.00010756652
Marked as misclassified No
Message-id <1262542424.06.0.984064940302.issue7622@psf.upfronthosting.co.za>
In-reply-to
Content
The patch looks wrong for bytearrays. They are mutable, so you shouldn't return the original object as an optimization. Here is the current (unpatched) behaviour:

>>> a = bytearray(b"abc")
>>> b, = a.split()
>>> b is a
False

On the other hand, you aren't doing this optimization at all in the general case of stringlib_split() and stringlib_rsplit(), while it could be done.
History
Date User Action Args
2010-01-03 18:13:44pitrousetrecipients: + pitrou, flox
2010-01-03 18:13:44pitrousetmessageid: <1262542424.06.0.984064940302.issue7622@psf.upfronthosting.co.za>
2010-01-03 18:13:42pitroulinkissue7622 messages
2010-01-03 18:13:42pitroucreate