Message157804
Side note: Windows requires that args be quoted with ", not ', to work properly, at least with these args.
Main note: the patched test adds a space to the separator, but that is not enough to account for the difference.
c:\Programs\Python32>python -m timeit -s "seq=[bytes([i]*1000) for i in range(256)]" "b''.join(seq)"
10000 loops, best of 3: 31.7 usec per loop
c:\Programs\Python32>python -m timeit -s "seq=[bytes([i]*1000) for i in range(256)]" "b' '.join(seq)"
10000 loops, best of 3: 34.1 usec per loop
The behavior change is wrong and test_bytes.py seems to need augmentation. It begins with "XXX This is a mess. [...]".
class BaseBytesTest(unittest.TestCase):
def test_join(self)
tests b''.join([]) but as far as I can tell, not b'something'.join([]), the failing case found by Serhiy.
It end with " # XXX more...". |
|
Date |
User |
Action |
Args |
2012-04-08 18:37:45 | terry.reedy | set | recipients:
+ terry.reedy, pitrou, vstinner, benjamin.peterson, ezio.melotti, jcon, serhiy.storchaka |
2012-04-08 18:37:45 | terry.reedy | set | messageid: <1333910265.25.0.343508440903.issue12805@psf.upfronthosting.co.za> |
2012-04-08 18:37:44 | terry.reedy | link | issue12805 messages |
2012-04-08 18:37:44 | terry.reedy | create | |
|