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/2004-September/048843.html below:

[Python-Dev] PEP 265 - Sorting dicts by value

[Python-Dev] PEP 265 - Sorting dicts by value [Python-Dev] PEP 265 - Sorting dicts by valueAndrew Durdin adurdin at gmail.com
Mon Sep 13 06:21:38 CEST 2004
On Mon, 13 Sep 2004 12:29:11 +1000, David Harrison
<dave.l.harrison at gmail.com> wrote:
> 
> In the sense that items() can still be used as before, it remains
> consistent.  However since the same argument could be used to equally
> promote the modification of other  dict functions to accept such
> arguments - such as keys(values_first=0)  - to make the change to
> items() alone is (in my humble opinion) inconsistent.
> But that's just my opinion, others may feel differently.

To me, neither mydict.keys(values_first=whatever) nor
mydict.values(values_first=whatever) make any sense: these methods
return a list of only keys or only values, so saying "values first"
when you're getting a list of keys is meaningless.
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