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/2014-December/137599.html below:

[Python-Dev] Python 2.x and 3.x use survey, 2014 edition

[Python-Dev] Python 2.x and 3.x use survey, 2014 editionAntoine Pitrou solipsis at pitrou.net
Tue Dec 16 20:42:06 CET 2014
On Tue, 16 Dec 2014 19:25:35 +0000
Brett Cannon <brett at python.org> wrote:
> 
> As for the changing of the default in Python 3, that's because we decided
> to make iterators the default everywhere. And that was mostly for
> consistency, not performance reasons. It was also for flexibility as you
> can go from an iterator to a list by just wrapping the iterator in list(),
> but you can't go the other way around.

And two other reasons:
- the API becomes simpler to use as there's no need to choose
  between .items() and .iteritems(), etc.
- the 3.x methods don't return iterators but views, which have set-like
  features in addition to basic iterating

Regards

Antoine.
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