A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2006-March/062064.html below:

[Python-Dev] iterator API in Py3.0

[Python-Dev] iterator API in Py3.0Oleg Broytmann phd at mail2.phd.pp.ru
Sat Mar 4 22:05:49 CET 2006
On Sat, Mar 04, 2006 at 03:45:03PM -0500, Phillip J. Eby wrote:
> At 09:34 AM 3/4/2006 -0800, Anna Ravenscroft wrote:
> >I think this is a really good point. next() is supposed to get used, by 
> >coders, in regular code - so it shouldn't be __next__. I can understand 
> >the desire for both forms, although that seems it would clutter things up 
> >unnecessarily - particularly if the two do the same thing.
> 
> By this argument, we should be using ob.len() instead of len(ob), and 
> ob.iter() instead of iter(ob).

   Yes, I think it'd be more consistent and more object-oriented. After all
we've switched from string.split(x, y) to x.split(y)...

Oleg.
-- 
     Oleg Broytmann            http://phd.pp.ru/            phd at phd.pp.ru
           Programmers don't die, they just GOSUB without RETURN.
More information about the Python-Dev mailing list

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