Gabriel Genellina wrote:
En Wed, 24 Dec 2008 06:23:00 -0200, <pyt...@bdurham.com> escribió:
... k1 = set(dict1.iterkeys())
You've got an excelent explanation from Marc Rintsch. (Note that in
Python 3.0 keys() behaves as iterkeys() in previous versions, so the
above code is supposed to be written in Python 2.x)
And, in fact, a dictionary iterates its keys, so:
k1 = set(dict1)
works in 2.4, 2.5, 2.6, and 3.0
--Scott David Daniels
scott.dani...@acm.org
--
http://mail.python.org/mailman/listinfo/python-list