Mark Bottjer mark_bottjer at
Thu Aug 12 19:17:59 CEST 2004

Roy Smith wrote:
> A solution to that is to factor out the function definition from the 
> name binding, so you would do something like:
> foo = def ():
>    whatever
> although by the time you do that, you might as well have just gotten rid 
> of def and used lambda() directly.  If you wanted it to be a 
> static/class method, you would do:
> foo = staticmethod_def ():
>    whatever

I agree that this seems to be the cleanest solution, but I also agree 
with you that it is a non-starter. Maybe when we get subclassable 
statements in Python 3.0. :)

   -- Mark

More information about the Python-list mailing list