A RetroSearch Logo

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

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2009-January/085559.html below:

[Python-Dev] pprint(iterator)

[Python-Dev] pprint(iterator)Guido van Rossum guido at python.org
Tue Jan 27 23:42:59 CET 2009
On Tue, Jan 27, 2009 at 2:24 PM, Raymond Hettinger <python at rcn.com> wrote:
>
> [Guido van Rossum]
>>
>> My only thought is that whatever you do, target Python 3.1, not 3.0.1.
>
> Of course.
> Do you have any thoughts on the most useful display format?
> What do you want to see from pprint(mydict.items())?

Perhaps <['a', 'b', ...]> ? The list display is familiar to everyone;
the surrounding <> make it clear that it's not really a list without
adding much noise.

Another idea would be <dict_items: ['a', 'b', ...]> which helpfully
includes the name of the type of the object that was passed into
pprint().

Regarding range(), I wonder if we really need to show more than
'range(0, 10)' -- anything besides that would be wasteful IMO.

-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)
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