>> I doubt there are many uses at all for dict.keys() -- most uses can jsut use the dict.
> > > > I use key() all the time to sort the keys before printing. > > > > for name in sorted(dict.key()): > > print(name, dict[name) > > Why not just use sorted(dict)? Thanks for so nicely making my point :-) Though I do like the keys() version: it seems more obvious to me. -CHB -- Christopher Barker, PhD Python Language Consulting - Teaching - Scientific Software Development - Desktop GUI and Web Development - wxPython, numpy, scipy, Cython
_______________________________________________ Python-ideas mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/[email protected]/message/Y53IRUZWOF7NK3CI5T5UQQY67IXMHK6U/ Code of Conduct: http://python.org/psf/codeofconduct/
