> The main defense is that the typical use case is > > for i in xrange(len(some_list)) > > In that case, it is desirable not to create an additional object, and > nobody will notice the difference. Is it really so bad if this allocates *two* objects instead of one? I think that's the only to get my example to work correctly. And it *has* to work correctly. If two objects are created anyway, I agree with Oren that it's better to have a separate range-iterator object type. --Guido van Rossum (home page: http://www.python.org/~guido/)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4