[issue2690] Precompute range length
Nick Coghlan
report at bugs.python.org
Tue Sep 2 17:27:50 CEST 2008
Nick Coghlan <ncoghlan at gmail.com> added the comment:
This issue was missing a priority setting.
Alexander's range-sequence patch still applies cleanly to the Py3k
branch, and "make test" still runs correctly after applying it.
As Alexander notes above, range_contains does still need slightly better
handling of non-integer numbers - I suggest doing a numeric conversion
via PyNumber_Index(el) at the beginning of range_contains, and if that
conversion fails, do a conversion via PyNumber_Long(el) and immediately
return False if the result is not equal to el itself (i.e. only integer
values of non-integer types will be found in the range.
Since that explanation got kind of complicated, I've added a modified
patch that includes the above change, and adds a couple of additional
tests to ensure a non-integer floating point value won't be found in the
sequence.
----------
keywords: +needs review
priority: -> release blocker
Added file: http://bugs.python.org/file11345/issue2690-range-sequence-ncoghlan.diff
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue2690>
_______________________________________
More information about the Python-bugs-list
mailing list