[Python-3000] PEP 3132: Extended Iterable Unpacking (original) (raw)
Greg Ewing greg.ewing at canterbury.ac.nz
Fri May 4 06:13:21 CEST 2007
- Previous message: [Python-3000] PEP 3132: Extended Iterable Unpacking
- Next message: [Python-3000] PEP 3132: Extended Iterable Unpacking
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Simon Percivall wrote:
if the proposal is constrained to only allowing the *name at the end, wouldn't a more useful behavior be to not exhaust the iterator, making it similar to:
> it = iter(range(10)) > a = next(it) > b = it or would this be too surprising?
It would surprise the heck out of me when I started with something that wasn't an iterator and ended up with b being something that I could only iterate and couldn't index.
-- Greg
- Previous message: [Python-3000] PEP 3132: Extended Iterable Unpacking
- Next message: [Python-3000] PEP 3132: Extended Iterable Unpacking
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]