On Feb 25, 11:41 pm, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote:
> Just looks like an extension of the normal tuple unpacking feature
> of the language.
>
Yep, it looks like good Python to me too. Maybe the tutorial could be
extended to cover this form of parameter too?
It would be good
Virgil Dupras:
> Without the call example, I would have
> had a hard time to try to figure out what these extra brackets are
> for. For this reason, I think that an explicit unpack is more
> readable, and thus better.
I can't agree.
Bye,
bearophile
--
http://mail.python.org/mailman/listinfo/py
"Arnaud Delobelle" <[EMAIL PROTECTED]> wrote:
> On Feb 25, 6:00 pm, "Paddy" <[EMAIL PROTECTED]> wrote:
> > I blogged on finding a new-to-me feature of Python, in that you are
> > allowed to nnest parameter definitions:
> >
> > >>> def x ((p0, p1), p2):
> >
> > ... return p0,p1,p2
> > ...>>> x
En Sun, 25 Feb 2007 15:00:31 -0300, Paddy <[EMAIL PROTECTED]>
escribió:
def x ((p0, p1), p2):
> ... return p0,p1,p2
The first time I saw it used was in Zope, a long time ago. And I like it.
Of course it only has any sense if you expect the tuple (p0,p1) to exist
*before* the functi
On Sun, 25 Feb 2007 11:06:03 -0800, Virgil Dupras wrote:
> On Feb 25, 1:00 pm, "Paddy" <[EMAIL PROTECTED]> wrote:
>> I blogged on finding a new-to-me feature of Python, in that you are
>> allowed to nnest parameter definitions:
>>
>> >>> def x ((p0, p1), p2):
>>
>> ... return p0,p1,p2
[snip]
On Sun, 25 Feb 2007 10:00:31 -0800, Paddy wrote:
> I wondered if those of you with some Python experience new of nested
> parameters and don't use them; or just forgot/don't know it is
> possible?
I learnt about this some time ago. I don't often use it, although it makes
sense to write this:
def
On Feb 25, 7:06 pm, "Virgil Dupras" <[EMAIL PROTECTED]>
wrote:
> On Feb 25, 1:00 pm, "Paddy" <[EMAIL PROTECTED]> wrote:
>
>
>
> > I blogged on finding a new-to-me feature of Python, in that you are
> > allowed to nnest parameter definitions:
>
> > >>> def x ((p0, p1), p2):
>
> > ... return p0,p
On Feb 25, 6:00 pm, "Paddy" <[EMAIL PROTECTED]> wrote:
> I blogged on finding a new-to-me feature of Python, in that you are
> allowed to nnest parameter definitions:
>
> >>> def x ((p0, p1), p2):
>
> ... return p0,p1,p2
> ...>>> x(('Does', 'this'), 'work')
>
> ('Does', 'this', 'work')
Reminds
On Feb 25, 1:00 pm, "Paddy" <[EMAIL PROTECTED]> wrote:
> I blogged on finding a new-to-me feature of Python, in that you are
> allowed to nnest parameter definitions:
>
> >>> def x ((p0, p1), p2):
>
> ... return p0,p1,p2
> ...>>> x(('Does', 'this'), 'work')
>
> ('Does', 'this', 'work')
>
>
>
>