diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2019-06-01 21:05:48 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-01 21:05:48 (GMT) |
commit | bdbad71b9def0b86433de12cecca022eee91bd9f (patch) | |
tree | 147c8a3e08454a95e0e4900388d88f7b65430f63 /Lib/test/test_index.py | |
parent | 1a4d9ffa1aecd7e750195f2be06d3d16c7a3a88f (diff) | |
download | cpython-bdbad71b9def0b86433de12cecca022eee91bd9f.zip cpython-bdbad71b9def0b86433de12cecca022eee91bd9f.tar.gz cpython-bdbad71b9def0b86433de12cecca022eee91bd9f.tar.bz2 |
bpo-20092. Use __index__ in constructors of int, float and complex. (GH-13108)
Diffstat (limited to 'Lib/test/test_index.py')
-rw-r--r-- | Lib/test/test_index.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_index.py b/Lib/test/test_index.py index a2ac321..cbdc56c 100644 --- a/Lib/test/test_index.py +++ b/Lib/test/test_index.py @@ -60,7 +60,7 @@ class BaseTestCase(unittest.TestCase): # subclasses. See issue #17576. class MyInt(int): def __index__(self): - return int(self) + 1 + return int(str(self)) + 1 my_int = MyInt(7) direct_index = my_int.__index__() |