A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2001-February/012650.html below:

for in dict (user expectation poll)

[Python-Dev] re: for in dict (user expectation poll) [Python-Dev] re: for in dict (user expectation poll)Fredrik Lundh fredrik@pythonware.com
Mon, 5 Feb 2001 22:02:42 +0100
> But then we should review the wisdom of using "if x in dict" as a
> shortcut for "if dict.has_key(x)" again.  Everything is tied together!

yeah, don't forget unpacking assignments:

    assert len(dict) == 3
    { k1:v1, k2:v2, k3:v3 } = dict

Cheers /F




RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4