[Python-ideas] Suggestion for Style Guide for Python Code PEP 8

Nick Coghlan ncoghlan at gmail.com
Sun May 15 12:40:31 CEST 2011


On Sun, May 15, 2011 at 12:17 AM, Georg Brandl <g.brandl at gmx.net> wrote:
> I'd hope that simple things like "k in d" are already in every tutorial
> on Python that's worth anything...

In this particular case, the official docs are already quite explicit:

"""has_key() is deprecated in favor of key in d."""

http://docs.python.org/library/stdtypes.html#dict.has_key

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia



More information about the Python-ideas mailing list