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


Groups > comp.lang.python > #97094

Re: Modifying signature of ctor in class

Path csiph.com!goblin1!goblin.stu.neva.ru!uio.no!news.tele.dk!news.tele.dk!small.news.tele.dk!newsgate.cistron.nl!newsgate.news.xs4all.nl!nzpost1.xs4all.net!not-for-mail
Return-Path <jcasale@activenetwerx.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.025
X-Spam-Evidence '*H*': 0.95; '*S*': 0.00; 'cc:addr:python-list': 0.09; 'friends)': 0.16; 'received:172.18.0': 0.16; 'run.': 0.16; 'subject:class': 0.16; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'appears': 0.23; 'seems': 0.23; 'examples': 0.24; 'header :In-Reply-To:1': 0.24; 'module': 0.25; 'specify': 0.27; 'function': 0.28; 'inspect': 0.29; 'class': 0.33; "isn't": 0.35; 'there': 0.36; '(and': 0.36; 'subject:: ': 0.37; 'thanks': 0.37; 'info,': 0.93
X-Authority-Analysis v=2.1 cv=NrEbCZpJ c=1 sm=1 tr=0 a=g3mLq75WYuDrh3Lt0JSDww==:117 a=g3mLq75WYuDrh3Lt0JSDww==:17 a=QC7fh9NfAAAA:8 a=5pFAO2ZBLFIA:10 a=8nJEP1OIZ-IA:10 a=ff-B7xzCdYMA:10 a=ETCpImJlgSmWeaPT9R4A:9 a=wPNLvfGTeEIA:10
X-Spam-Checker-Version SpamAssassin 3.4.0 (2014-02-07) on mail.activenetwerx.com
X-Spam-Level *
X-Spam-Status No, score=1.3 required=5.0 tests=RDNS_NONE autolearn=no autolearn_force=no version=3.4.0
From "Joseph L. Casale" <jcasale@activenetwerx.com>
To gal kauffman <gal.kauffman@gmail.com>
CC "python-list@python.org" <python-list@python.org>
Subject Re: Modifying signature of ctor in class
Thread-Topic Modifying signature of ctor in class
Thread-Index AQHQ9weIGzVVeo4s60Sc6dvZps29lZ5MiDaA//+shSY=
Date Thu, 24 Sep 2015 21:41:44 +0000
References <CANN3ufmqcPd2OE_EaushruEW-ZVfvnMczQ2+jo9Ew5fZdWdOdw@mail.gmail.com>
In-Reply-To <CANN3ufmqcPd2OE_EaushruEW-ZVfvnMczQ2+jo9Ew5fZdWdOdw@mail.gmail.com>
Accept-Language en-US
Content-Language en-US
X-MS-Has-Attach
X-MS-TNEF-Correlator
x-ms-exchange-transport-fromentityheader Hosted
x-originating-ip [72.29.233.193]
Content-Type text/plain; charset="iso-8859-1"
Content-Transfer-Encoding quoted-printable
MIME-Version 1.0
X-CMAE-Envelope MS4wfNtAL6r0MvaQCmrIPQQ1k3o0dXxJdyEImjB1qbv0fmBwToDJrImigrb62oKYvXDtTj4CZ8HZcWIea43d3M/h+6uXBb/pFFK2BiPb5OVs/tyzA4GX5mBW9EwRH9ShHqI6AacIbzJd7jzOKRD80Z1X92ZU40OwcH3gllCxqrMbnRV4n4dLfC/5Gvapj31f2tHcIA==
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.20+
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.146.1443130914.28679.python-list@python.org> (permalink)
Lines 16
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1443130914 news.xs4all.nl 23806 [2001:888:2000:d::a6]:32800
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:97094

Show key headers only | View raw


> You can use the FunctionType class found in the types module (and its friends) to create functions on the run.
> And you can use the 'inspect' module to inspect existing functions, if you need to base the new function on an existing one.

Hi Gal,
Seems the types module docs do not even have a single line of docs
for FunctionType and there isn't any that I found online. From the few
examples on StackOverflow it appears like it might do the job however
I do not see how to specify a signature, I only see how to specify defaults.

Do you have any ideas?

Thanks for the info,
jlc

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: Modifying signature of ctor in class "Joseph L. Casale" <jcasale@activenetwerx.com> - 2015-09-24 21:41 +0000

csiph-web