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


Groups > comp.lang.python > #60852

Re: Extending the 'function' built-in class

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <dreamingforward@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.034
X-Spam-Evidence '*H*': 0.93; '*S*': 0.00; "subject:' ": 0.07; 'differing': 0.09; 'cc:addr:python-list': 0.11; 'python': 0.11; 'def': 0.12; 'cc:name:python list': 0.16; 'subject:class': 0.16; 'tried:': 0.16; 'cc:addr:python.org': 0.22; 'cc:2**0': 0.24; 'class.': 0.26; 'header:In-Reply-To:1': 0.27; 'message- id:@mail.gmail.com': 0.30; 'class': 0.32; 'this.': 0.32; 'extend': 0.32; 'figure': 0.32; 'subject:the': 0.34; "can't": 0.35; 'but': 0.35; 'received:google.com': 0.35; 'possible': 0.36; 'hi,': 0.36; 'error.': 0.37; 'searching': 0.37; 'how': 0.40; "you're": 0.61; 'computation,': 0.84; 'ultimate': 0.93; 'washington': 0.93
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=Fx4iZmXKBPvrOTVeHV043rDNZMvIVgLFJPhyO+JfBro=; b=dVAblaVDEuyR0lUj2wVS+XTOaIYxPqIkevjLzvskHNbi1QDQ47rB2d0Ug+69PZYkOh R5vJblF61KGHPUuiNZenBtTxhfCBGiInYot7ExbvEIwJzJx9KudCxgLgeTX3E2YRnZ3S /9JfDdrgZ6DBlUgH0QV1wwIg4N7oeUovaVjoRmZP+zDPPSRsfMs4YZuYIxsiNq2QOcMD lARC7K+4YBZYrQhF2rEFgRim07COLIh6GU8UEZyNsJ5ap2YsUg5JQg8rOdKXYXBae2es VMUvxeqfCjPhpuFPdNhKi/T1WgDBMKeBX3FWog7yX72442qZNPjhHR+7X3KZr+U2ZEBc GrDw==
MIME-Version 1.0
X-Received by 10.180.183.72 with SMTP id ek8mr16080412wic.49.1385947610700; Sun, 01 Dec 2013 17:26:50 -0800 (PST)
In-Reply-To <529b8ba2$0$2270$426a74cc@news.free.fr>
References <529b8ba2$0$2270$426a74cc@news.free.fr>
Date Sun, 1 Dec 2013 17:26:50 -0800
Subject Re: Extending the 'function' built-in class
From Mark Janssen <dreamingforward@gmail.com>
To "G." <grumsk@grumsk.tz>
Content-Type text/plain; charset=ISO-8859-1
Cc Python List <python-list@python.org>
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.3455.1385947612.18130.python-list@python.org> (permalink)
Lines 11
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1385947612 news.xs4all.nl 15864 [2001:888:2000:d::a6]:33121
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:60852

Show key headers only | View raw


> 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 ?

It has to do with differing models of computation, and python isn't
designed for this.  Perhaps you're searching for the ultimate lambda?.
-- 
MarkJ
Tacoma, Washington

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