Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #60836

Re: Extending the 'function' built-in class

Path csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <gary.herron@islandtraining.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.013
X-Spam-Evidence '*H*': 0.97; '*S*': 0.00; "subject:' ": 0.07; 'received:67.192': 0.09; 'received:67.192.241': 0.09; 'received:dfw.emailsrvr.com': 0.09; 'def': 0.12; 'nameerror:': 0.16; 'subject:class': 0.16; 'tried:': 0.16; 'wrote:': 0.18; 'trying': 0.19; 'python?': 0.22; 'header:User-Agent:1': 0.23; 'error': 0.23; 'questions:': 0.24; 'received:emailsrvr.com': 0.24; 'class.': 0.26; 'received:(smtp server)': 0.26; 'defined': 0.27; 'header:In-Reply-To:1': 0.27; 'function': 0.29; 'am,': 0.29; 'code': 0.31; 'gary': 0.31; 'class': 0.32; 'extend': 0.32; 'figure': 0.32; 'says': 0.33; 'subject:the': 0.34; "can't": 0.35; 'but': 0.35; 'version': 0.36; 'possible': 0.36; 'hi,': 0.36; 'error.': 0.37; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'how': 0.40; 'name': 0.63; 'such': 0.63; 'particular:': 0.84; 'thing,': 0.91
X-Virus-Scanned OK
Date Sun, 01 Dec 2013 11:38:57 -0800
From Gary Herron <gary.herron@islandtraining.com>
User-Agent Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.1.1
MIME-Version 1.0
To python-list@python.org
Subject Re: Extending the 'function' built-in class
References <529b8ba2$0$2270$426a74cc@news.free.fr>
In-Reply-To <529b8ba2$0$2270$426a74cc@news.free.fr>
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.3440.1385927196.18130.python-list@python.org> (permalink)
Lines 23
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1385927196 news.xs4all.nl 15924 [2001:888:2000:d::a6]:36862
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:60836

Show key headers only | View raw


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 | NextPrevious in thread | Next in thread | Find similar | Unroll thread


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