Greg Ewing wrote:
Guido van Rossum wrote:
I would like to see the following:

- sq_length should return maxsize if the actual value doesn't fit

So that code will silently behave as though the rest of
the sequence wasn't there some of the time?

Can you elaborate on the rationale for this? I'm having
trouble seeing how it's a good idea.


Yeah, it sounds more like behaviour I would expect from __length_hint__, not __length__.

In the bug tracker, Alexander mentioned the possibility of removing __length__ and __getitem__ support from range() objects in py3k, and implementing only __length_hint__ instead (leaving range() as a bare-bones iterable). I'm starting to like that idea more and more.

Cheers,
Nick.

--
Nick Coghlan   |   [EMAIL PROTECTED]   |   Brisbane, Australia
---------------------------------------------------------------
            http://www.boredomandlaziness.org
_______________________________________________
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to