Re: [Python-Dev] Re: syntactic shortcut - unpack to variably sizedlist

Raymond Hettinger wrote:
There's currently 3 things in the PEP draft: 1. Allow slice objects as arguments list.pop and array.pop 2. Add itertools.iunpack 3. Record the rejection of a, b, *c = L in a PEP (since it's been rejected three times now - once in 2001, and twice this year) The first of those could probably be done without a PEP (given that a strict reading of the documentation suggests that those methods *should* handle slices) The 2nd can certainly be separated out. Since I now know that, for actual iterators (rather than iterables), islice(n) will usually consume the first n elements, it loses some of its appeal (i.e. islice already has most of the features I like about iunpack). The 3rd - well, I thought Guido's rejection in August suggested his position was unlikely to change (the AST branch going in for 2.5 doesn't seem to be significant enough to prompt a change of heart, and I can't think of anything else likely to affect his stated reasons for rejection). I have no great problem with leaving the a, b, *c = L idea unPEPed if there is interest in leaving the idea 'open', though. Cheers, Nick. -- Nick Coghlan | Brisbane, Australia Email: ncoghlan@email.com | Mobile: +61 409 573 268
participants (1)
-
Nick Coghlan