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/2005-March/051988.html below:

[Python-Dev] LinkedHashSet/LinkedHashMap equivalents

[Python-Dev] LinkedHashSet/LinkedHashMap equivalents [Python-Dev] LinkedHashSet/LinkedHashMap equivalentsBJörn Lindqvist bjourne at gmail.com
Thu Mar 10 14:07:04 CET 2005
I would LOVE for **kwargs to be an ordered dict. It would allow me to
write code like this:

.class MyTuple:
.    def __init__(self, **kwargs):
.        self.__dict__ = ordereddict(kwargs)
.
.    def __iter__(self):
.        for k, v in self.__dict__.items():
.            yield v
.
.t = MyTuple(r = 99, g = 12, b = 4)
.r, g, b = t
.print r, g, b

I know it goes beyond the original intention of the proposal, but I
figure I'd mention it anyway because the unorder of **kwargs has been
bugging me alot.

-- 
mvh Björn
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