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 marco.buttu
Recipients marco.buttu
Date 2013-01-10.14:08:14
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1357826895.67.0.646270991721.issue16916@psf.upfronthosting.co.za>
In-reply-to
Content
The PEP 3132 said:
"""
... if seq is a slicable sequence, all the following assignments are equivalent if seq has at least three elements:

a, b, c = seq[0], seq[1:-1], seq[-1]
a, *b, c = seq
[a, *b, c] = seq
"""

But this doesn't happen for byte strings:

>>> seq = b'xyz'
>>> a, b, c = seq[0], seq[1:-1], seq[-1]
>>> a, b, c
(120, b'y', 122)
>>> a, *b, c = seq
>>> a, b, c
(120, [121], 122)

Tested on Python3.3 and Python3.2 (Linux Ubuntu 11.04)
History
Date User Action Args
2013-01-10 14:08:15marco.buttusetrecipients: + marco.buttu
2013-01-10 14:08:15marco.buttusetmessageid: <1357826895.67.0.646270991721.issue16916@psf.upfronthosting.co.za>
2013-01-10 14:08:15marco.buttulinkissue16916 messages
2013-01-10 14:08:14marco.buttucreate