On Jan 25, 9:01 pm, Duncan Booth <[EMAIL PROTECTED]> wrote:
> rndblnch <[EMAIL PROTECTED]> wrote:
> > the following example should also
> > work:
> > size = Point(width=23, height=45)
> > w, h = size
>
> So you want the unpacking to depend on how the Point was initialised!
> Aaargh!

why not?
in

def f(*args):
    return iter(args)

the order of the parameters do have a semantic,
i can predict the behaviour of:

x, y = f(1, 2)

to bad it's not possible with:

def g(**kwargs):
    return kwargs.itervalues()

x, y = g(x=1, y=2)

renaud
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to