Message97174
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. |
|
Date |
User |
Action |
Args |
2010-01-03 18:13:44 | pitrou | set | recipients:
+ pitrou, flox |
2010-01-03 18:13:44 | pitrou | set | messageid: <1262542424.06.0.984064940302.issue7622@psf.upfronthosting.co.za> |
2010-01-03 18:13:42 | pitrou | link | issue7622 messages |
2010-01-03 18:13:42 | pitrou | create | |
|