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/2009-January/085548.html below:

[Python-Dev] pprint(iterator)

[Python-Dev] pprint(iterator)Oleg Broytmann phd at phd.pp.ru
Tue Jan 27 23:06:34 CET 2009
On Tue, Jan 27, 2009 at 01:46:35PM -0800, Raymond Hettinger wrote:
>    <enumerate object: 'A', 'B', 'C', 'D', 'E', 'F'>

   I like the idea, and I prefer this formatting. Also bear in mind there
are infinite generators, and there are iterators that cannot be reset. For
infinite generators pprint() must have a parameter, say, 'max_items', and
print <generator: 'A', 'B', 'C', 'D', 'E', 'F', ...>. The situation with
iterators that cannot be reset should be documented.

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