>> 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 -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/Y53IRUZWOF7NK3CI5T5UQQY67IXMHK6U/ Code of Conduct: http://python.org/psf/codeofconduct/