Extending the 'function' built-in class
Gary Herron
gary.herron at islandtraining.com
Sun Dec 1 14:38:57 EST 2013
On 12/01/2013 11:18 AM, G. wrote:
> Hi, I can't figure out how I can extend the 'function' built-in class. I tried:
> class test(function):
> def test(self):
> print("test")
> but I get an error. Is it possible ?
>
> Regards, G.
What error do you get?
What version of Python?
What OS?
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?
All of which begs the questions: What do you think the function class
is, and why are you trying to extend it?
Gary Herron
More information about the Python-list
mailing list