Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #60836
| Date | 2013-12-01 11:38 -0800 |
|---|---|
| From | Gary Herron <gary.herron@islandtraining.com> |
| Subject | Re: Extending the 'function' built-in class |
| References | <529b8ba2$0$2270$426a74cc@news.free.fr> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.3440.1385927196.18130.python-list@python.org> (permalink) |
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
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Extending the 'function' built-in class "G." <grumsk@grumsk.tz> - 2013-12-01 19:18 +0000
Re: Extending the 'function' built-in class Roy Smith <roy@panix.com> - 2013-12-01 14:30 -0500
Re: Extending the 'function' built-in class "G." <grumsk@grumsk.tz> - 2013-12-01 19:37 +0000
Re: Extending the 'function' built-in class Tim Chase <python.list@tim.thechases.com> - 2013-12-01 13:43 -0600
Re: Extending the 'function' built-in class Gary Herron <gary.herron@islandtraining.com> - 2013-12-01 11:38 -0800
Re: Extending the 'function' built-in class "G." <grumsk@grumsk.tz> - 2013-12-01 20:13 +0000
Re: Extending the 'function' built-in class Robert Kern <robert.kern@gmail.com> - 2013-12-01 20:18 +0000
Re: Extending the 'function' built-in class Mark Janssen <dreamingforward@gmail.com> - 2013-12-01 17:26 -0800
Re: Extending the 'function' built-in class alex23 <wuwei23@gmail.com> - 2013-12-02 12:24 +1000
Re: Extending the 'function' built-in class Steven D'Aprano <steve@pearwood.info> - 2013-12-02 07:01 +0000
Re: Extending the 'function' built-in class "G." <grumsk@grumsk.tz> - 2013-12-02 09:32 +0000
csiph-web