Paul Rubin a écrit :
> [EMAIL PROTECTED] writes:
> 
>>In this particular case it was clearly unnecessary and just obfuscated the
>>code.  I'm wondering, are there some general cases where __call__ methods of
>>a user-defined class are simply indispensable?
> 
> 
> I don't know about "indispensable" but __call__ is convenient sometimes
> and I do use it.  I've wished that modules supported call, so I could
> say
> 
>     import foo
>     x = foo(3)
> 
> instead of having to say x=foo.foo(3) or something like that.

from foo import foo
x = foo(3)

Or did I miss the point ???
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to