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

Raymond Hettinger wrote:
Also, the pep would likely kill the remote, but non-zero chance of ever getting the a,b,*c syntax. IOW, the pep may be a step backwards.
Officially killing that syntax was actually one of the stated goals of the PEP. However, the PEP editors would be well within their rights to reject the draft as 'lacking focus'. I wouldn't be offended given the whole 20 minutes it took to write it :) Cheers, Nick. -- Nick Coghlan | Brisbane, Australia Email: ncoghlan@email.com | Mobile: +61 409 573 268

On Sun, 21 Nov 2004 03:34:34 +1000, Nick Coghlan <ncoghlan@iinet.net.au> wrote:
By itself, both alternatives presented in the implementation do not "kill" the a,b,*c syntax. I prefer to argue that list.pop(slice) and iunpack(...) do facilitate future support for it, while at the same time removing immediate pressure by providing an easy alternative to support one version of the idiom that still uses current Python syntax. Other potential argument against is that the PEP provides two ways to make it, contrary to the "one way to do it" motto. But both cases, while related, are really focused on solving two different problems; one is a generic solution for iterables (which happend to include a whole bunch of objects, including tuples and lists), and the other is an optimization for mutable lists. There's no reason not to support both (of course, if the whole point of the PEP is accepted). -- Carlos Ribeiro Consultoria em Projetos blog: http://rascunhosrotos.blogspot.com blog: http://pythonnotes.blogspot.com mail: carribeiro@gmail.com mail: carribeiro@yahoo.com

On Sun, 21 Nov 2004 03:34:34 +1000, Nick Coghlan <ncoghlan@iinet.net.au> wrote:
By itself, both alternatives presented in the implementation do not "kill" the a,b,*c syntax. I prefer to argue that list.pop(slice) and iunpack(...) do facilitate future support for it, while at the same time removing immediate pressure by providing an easy alternative to support one version of the idiom that still uses current Python syntax. Other potential argument against is that the PEP provides two ways to make it, contrary to the "one way to do it" motto. But both cases, while related, are really focused on solving two different problems; one is a generic solution for iterables (which happend to include a whole bunch of objects, including tuples and lists), and the other is an optimization for mutable lists. There's no reason not to support both (of course, if the whole point of the PEP is accepted). -- Carlos Ribeiro Consultoria em Projetos blog: http://rascunhosrotos.blogspot.com blog: http://pythonnotes.blogspot.com mail: carribeiro@gmail.com mail: carribeiro@yahoo.com
participants (2)
-
Carlos Ribeiro
-
Nick Coghlan