More bug 460020. When I is a subclass of int, disable the +I(whatever),

I(0) << whatever, I(0) >> whatever, I(whatever) << 0 and I(whatever) >> 0
optimizations.
This commit is contained in:
Tim Peters 2001-09-11 21:44:14 +00:00
parent 95fefc7a7a
commit 73a1dfe367
2 changed files with 15 additions and 10 deletions

View file

@ -1366,6 +1366,11 @@ def inherits():
a = hexint(12345)
verify(int(a) == 12345)
verify(int(a).__class__ is int)
verify((+a).__class__ is int)
verify((a >> 0).__class__ is int)
verify((a << 0).__class__ is int)
verify((hexint(0) << 12).__class__ is int)
verify((hexint(0) >> 12).__class__ is int)
class octlong(long):
__slots__ = []