Ben Finney wrote:

> If you want something that can be called *and* define its attributes,
> you want something more complex than the default function type. Define
> a class that has a '__call__' attribute, make an instance of that, and
> you'll be able to access attributes and call it like a function.

I turned Steven's question and portions of the answers into a Python FAQ 
entry:

     http://effbot.org/pyfaq/where-do-nested-functions-live.htm

Hope none of the contributors mind.

</F>

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

Reply via email to