[Patches] [ python-Patches-1109424 ] type conversion methods and
subclasses
SourceForge.net
noreply at sourceforge.net
Fri Feb 25 03:57:03 CET 2005
Patches item #1109424, was opened at 2005-01-25 14:04
Message generated for change (Comment added) made by bcannon
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1109424&group_id=5470
Category: Core (C code)
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Walter Dörwald (doerwalter)
>Assigned to: Brett Cannon (bcannon)
Summary: type conversion methods and subclasses
Initial Comment:
This patch fixes the classes int, long, float and
unicode so that type conversion methods (i.e. __int__,
__long__, __float__, __unicode__) are used for type
conversion in subclasses of int/long/float/unicode.
(See the following thread on python-dev for more info:
http://mail.python.org/pipermail/python-dev/2005-January/051175.html)
It also fixes the bug reported by Nick Coghlan here:
http://mail.python.org/pipermail/python-dev/2005-January/051196.html.
For int/long/float converting the instance of the
subclasses to the base class has been moved from
PyNumber_(Int|Long|Float) to the apropriate slot
nb_int, nb_long, nb_float of int/long/float.
----------------------------------------------------------------------
>Comment By: Brett Cannon (bcannon)
Date: 2005-02-24 18:57
Message:
Logged In: YES
user_id=357491
OK, BDFL pronounced on this saying the semantic change was fine. I will
have a look at the patch when I can and get it in. Won't touch 2.4 since it
is a semantic change, though.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1109424&group_id=5470
More information about the Patches
mailing list