[issue1766304] improve xrange.__contains__

Alexander Belopolsky report at bugs.python.org
Mon Feb 25 01:57:27 CET 2008


Alexander Belopolsky added the comment:

> Do we really need another way to spell a <= x < b? Have you got a
> real-world use case in mind for the version with step > 1?

> I'm at most lukewarm; I'd be willing to look at a patch to the C code
> in the py3k-struni branch, plus unit tests though.

-- GvR at http://thread.gmane.org/gmane.comp.python.python-
3000.devel/8732

I read this as a rejection for 2.x series.  For py3k, this is a 
premature optimization.  Current py3k implementation is likely to be 
optimized for regular size integers at some point.  This patch will only 
introduce more code to be changed then.

If this is not ready to be rejected for 2.x, let's wait for resolution 
of issue1540617 since it may result in backporting of py3k range 
implementation.

----------
nosy: +belopolsky

_____________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1766304>
_____________________________________


More information about the Python-bugs-list mailing list