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/2007-May/073447.html below:

[Python-Dev] nodef

[Python-Dev] nodef [Python-Dev] nodefRaymond Hettinger python at rcn.com
Thu May 24 06:47:46 CEST 2007
From: "Greg Ewing" 
> If the aforementioned iterable can yield *anything*,
> then it might yield this 'nodef' value as well.
> 
> For this reason, there *can't* exist any *standard*
> guaranteed-unambiguous sentinel value. Each use
> case needs its own, to ensure it's truly unambiguous
> in the context of that use case.

Right.

That's why Barry and others write:

missing = object()
v = d.get(k, missing)

That is the guaranteed way to get a unique object.


Raymond
More information about the Python-Dev mailing list

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