This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients Yclept.Nemo, mark.dickinson, serhiy.storchaka
Date 2012-06-30.06:13:21
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1341036802.16.0.219089478922.issue15224@psf.upfronthosting.co.za>
In-reply-to
Content
> 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.
History
Date User Action Args
2012-06-30 06:13:22serhiy.storchakasetrecipients: + serhiy.storchaka, mark.dickinson, Yclept.Nemo
2012-06-30 06:13:22serhiy.storchakasetmessageid: <1341036802.16.0.219089478922.issue15224@psf.upfronthosting.co.za>
2012-06-30 06:13:21serhiy.storchakalinkissue15224 messages
2012-06-30 06:13:21serhiy.storchakacreate