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/2001-June/015272.html below:

could int, str, tuple etc. become type objects?

[Python-Dev] quick poll: could int, str, tuple etc. become type objects?Tim Peters tim@digicool.com
Tue, 5 Jun 2001 15:56:59 -0400
Just to reduce this to its most trivial point <wink>,

> - What should the argument to dict() be?  A list of (key, value)
>  pairs, a list of alternating keys and values, or something else?

the middle one (perhaps generalized to "iterable object alternately
producing keys and values") is most useful in practice.  Perl gets a lot of
mileage of that, e.g. think of using re.findall() to build a list of
mail-header field, value, field, value, ... thingies to feed to a dict.    A
list of (key, value) pairs is prettiest, but almost nothing *produces* such
a list except for dict.items(); we don't need another way to spell
dict.copy().




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