rndblnch <[EMAIL PROTECTED]> wrote:

> 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?

You have to ask?

Because either you always initialise your Point with parameters in the same 
order, in which case just use positional parameters which is cleaner 
anyway, or when you have a function f(somePoint) you also need to know 
whether it takes a Point(width,height) or a Point(height,width) and if you 
get it wrong your code breaks.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to