diff options
| author | Tim Peters <tim.peters@gmail.com> | 2001-09-11 21:44:14 +0000 |
|---|---|---|
| committer | Tim Peters <tim.peters@gmail.com> | 2001-09-11 21:44:14 +0000 |
| commit | 73a1dfe3674429f923e98b84ef01df1614baad2f (patch) | |
| tree | 9af64d22a0bdc3b3b77d7c704cfcda6c098b58b7 /Lib/test/test_descr.py | |
| parent | 95fefc7a7a7d3c732b9b2a2102ced3bcc7859cda (diff) | |
| download | cpython-git-73a1dfe3674429f923e98b84ef01df1614baad2f.tar.gz | |
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.
Diffstat (limited to 'Lib/test/test_descr.py')
| -rw-r--r-- | Lib/test/test_descr.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_descr.py b/Lib/test/test_descr.py index 5c4db30335..e89f6425b9 100644 --- a/Lib/test/test_descr.py +++ b/Lib/test/test_descr.py @@ -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__ = [] |
