Ethan Furman added the comment:

True, but how big a deal is that?

For one, it seems questionable to have the presentation portion of the data be 
part of the key.

For two, when presentation is important a separate list must be kept anyway to 
preseed the dict; so just use that list to cycle through the canonicaldict:

--> some_dict = some_function_that_returns_a_conanicaldict()
--> presentation_list = ['IBM','Intel','AMD']
--> for company in presentation_list:
...     key = some_dict.key[company]  # demo purposes only
...     value = some_dict[company]
...     print(key, company, value)
ibm IBM 2172
intel Intel 3210
amd AMD 4399

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue18986>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to