Message164370
> On a side note, glancing at Python-3.3.0a4/Objects/rangeobject.c:
> range_contains seems to iterate through the entire range whereas __contains__ from the attached Range.py is O(1)
See issue1766304. For int range.__contains__ is O(1), for custom types this optimization is impossible without losing backward compatibility. |
|
Date |
User |
Action |
Args |
2012-06-30 06:13:22 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, mark.dickinson, Yclept.Nemo |
2012-06-30 06:13:22 | serhiy.storchaka | set | messageid: <1341036802.16.0.219089478922.issue15224@psf.upfronthosting.co.za> |
2012-06-30 06:13:21 | serhiy.storchaka | link | issue15224 messages |
2012-06-30 06:13:21 | serhiy.storchaka | create | |
|