Ian Kelly wrote:
On Fri, May 6, 2011 at 4:49 PM, Ethan Furman wrote:
Anybody care to chime in with their usage of this construct?
You should start with PEP 3106. The main idea is that dict.keys() and
dict.items() can be treated as frozensets, while still being more
lightweight than lists. That lets you do nifty things like "a.keys()
== b.keys()" which, if a and b are Python 3 dicts, will tell you
whether they contain the same keys.
Cool, thanks.
~Ethan~
--
http://mail.python.org/mailman/listinfo/python-list