New submission from Marco Buttu: 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) ---------- components: Interpreter Core messages: 179545 nosy: marco.buttu priority: normal severity: normal status: open title: The Extended Iterable Unpacking (PEP-3132) for byte strings doesn't match the specification type: behavior versions: Python 3.2, Python 3.3 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue16916> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com