Author pitrou
Recipients flox, pitrou
Date 2010-01-03.18:13:42
SpamBayes Score 0.000107567
Marked as misclassified No
Message-id <>
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

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.
Date User Action Args
2010-01-03 18:13:44pitrousetrecipients: + pitrou, flox
2010-01-03 18:13:44pitrousetmessageid: <>
2010-01-03 18:13:42pitroulinkissue7622 messages
2010-01-03 18:13:42pitroucreate