]> granicus.if.org Git - python/commit
SF bug #460020: bug or feature: unicode() and subclasses.
authorTim Peters <tim.peters@gmail.com>
Mon, 10 Sep 2001 20:52:51 +0000 (20:52 +0000)
committerTim Peters <tim.peters@gmail.com>
Mon, 10 Sep 2001 20:52:51 +0000 (20:52 +0000)
commit64b5ce3a69569b203a39f74c5c03348ba0a67583
tree87f71bc6ef25a7b7e11087afb1d7827bbcc4d474
parent8b4e43e768f3f49513f6f32f20ecb6478c1ad840
SF bug #460020:  bug or feature: unicode() and subclasses.
Given an immutable type M, and an instance I of a subclass of M, the
constructor call M(I) was just returning I as-is; but it should return a
new instance of M.  This fixes it for M in {int, long}.  Strings, floats
and tuples remain to be done.
Added new macros PyInt_CheckExact and PyLong_CheckExact, to more easily
distinguish between "is" and "is a" (i.e., only an int passes
PyInt_CheckExact, while any sublass of int passes PyInt_Check).
Added private API function _PyLong_Copy.
Include/intobject.h
Include/longintrepr.h
Include/longobject.h
Lib/test/test_descr.py
Objects/abstract.c
Objects/longobject.c