Extending the 'function' built-in class

G. grumsk at grumsk.tz
Sun Dec 1 21:13:52 CET 2013


Le 01-12-2013, Gary Herron <gary.herron at islandtraining.com> a écrit :
> And in particular: What 'function' built-in class?  I know of no such 
> thing, and the error message I get with your code says exactly that:
>    NameError: name 'function' is not defined
> Did you not get that same error?

Yes, indeed. The 'function' built-in class was the following one:
>>> type(lambda x: 2*x)
<type 'function'>

but I am interested by answers concerning other similar types also.

Regards, G.



More information about the Python-list mailing list