]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
Make subclasses of int, long, complex, float, and unicode perform type
authorBrett Cannon <bcannon@gmail.com>
Tue, 26 Apr 2005 03:45:26 +0000 (03:45 +0000)
committerBrett Cannon <bcannon@gmail.com>
Tue, 26 Apr 2005 03:45:26 +0000 (03:45 +0000)
commitc3647ac93e2a38762de8a23b1d94a6380e9ad468
treea7e00a7e8f70ee226fdeb3d229b9734d5b17a344
parentd7c795e72966f7c72b94b919f3539be66495e6c3
Make subclasses of int, long, complex, float, and unicode perform type
conversion using the proper magic slot (e.g., __int__()).  Also move conversion
code out of PyNumber_*() functions in the C API into the nb_* function.

Applied patch #1109424.  Thanks Walter Doewald.
Lib/test/test_builtin.py
Lib/test/test_complex.py
Lib/test/test_str.py
Lib/test/test_unicode.py
Misc/NEWS
Objects/abstract.c
Objects/floatobject.c
Objects/intobject.c
Objects/longobject.c
Objects/object.c