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 terry.reedy
Recipients benjamin.peterson, ezio.melotti, jcon, pitrou, serhiy.storchaka, terry.reedy, vstinner
Date 2012-04-08.18:37:44
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1333910265.25.0.343508440903.issue12805@psf.upfronthosting.co.za>
In-reply-to
Content
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...".
History
Date User Action Args
2012-04-08 18:37:45terry.reedysetrecipients: + terry.reedy, pitrou, vstinner, benjamin.peterson, ezio.melotti, jcon, serhiy.storchaka
2012-04-08 18:37:45terry.reedysetmessageid: <1333910265.25.0.343508440903.issue12805@psf.upfronthosting.co.za>
2012-04-08 18:37:44terry.reedylinkissue12805 messages
2012-04-08 18:37:44terry.reedycreate