[issue2735] range: lean and mean

Alexander Belopolsky report at bugs.python.org
Fri May 2 05:44:03 CEST 2008


Alexander Belopolsky <belopolsky at users.sourceforge.net> added the comment:

- With length precomputed in range_new, we can probably get rid of 
get_len_of_range.

 - There is no need to recompute length in range_iter.

A nit: iterator object's size member is called "len", but the same 
member of the range object is called "length."  I have no preference 
between the two names, but I think they should be the same.

Off-topic: why optimized iterator uses long rather than ssize_t 
arithmetics?  On x86-64, ssize_t is 64 and long is 32 bit.

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue2735>
__________________________________


More information about the Python-bugs-list mailing list