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