Paddy a écrit :
(snip)

> Is it not possible to write a function that queries its call stack
> when run to find the name of all arguments and locals() of the level
> above

> so you could write:
> 
> class test(object):
>   def __init__(self, x, y):
>     arg2inst()
> 
> and automatically assign self.x=x; self.y=y ?

Might be possible using the inspect module. But as far as I'm concerned, 
I'm not sure I really like the idea that much - no rationale here, just 
a feeling...

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

Reply via email to