]> granicus.if.org Git - python/commit
Check the type of values returned by __int__, __float__, __long__,
authorNeil Schemenauer <nascheme@enme.ucalgary.ca>
Mon, 19 Jul 2004 16:29:17 +0000 (16:29 +0000)
committerNeil Schemenauer <nascheme@enme.ucalgary.ca>
Mon, 19 Jul 2004 16:29:17 +0000 (16:29 +0000)
commit3a313e36555a3416799f3c049b8ebb41e9edeb8a
tree0e58c64208e51ae38be4292abf732a5177dd59c3
parent66edb6295f956af9c559ef037c5016c9f6b64261
Check the type of values returned by __int__, __float__, __long__,
__oct__, and __hex__.  Raise TypeError if an invalid type is
returned.  Note that PyNumber_Int and PyNumber_Long can still
return ints or longs.  Fixes SF bug #966618.
Lib/test/test_class.py
Misc/NEWS
Objects/abstract.c
Objects/intobject.c
Python/bltinmodule.c