Message306178
Writing my tests, I originally looked at Lib/test/seq_tests.py. One test case uses indexes that are (+-)4*sys.maxsize. This does not fit in Py_ssize_t, and so these tests cause my array implementation to raise an overflow exception.
A solution is of course to have the function take general objects instead, and then truncate them down to a number that can fit in Py_ssize_t if it's too negative or positive).
But I concur. It seems more reasonable to stay consistent with the rest of the module, too.
I'll look over the test code to make sure I test for every given scenario (or as many as I can think of), and prepare a PR for this, then :) |
|
Date |
User |
Action |
Args |
2017-11-14 00:00:39 | Phaqui | set | recipients:
+ Phaqui, rhettinger, vstinner, serhiy.storchaka, niki.spahiev |
2017-11-14 00:00:39 | Phaqui | set | messageid: <1510617639.78.0.213398074469.issue31956@psf.upfronthosting.co.za> |
2017-11-14 00:00:39 | Phaqui | link | issue31956 messages |
2017-11-14 00:00:39 | Phaqui | create | |
|