
May 24, 2007
4:47 a.m.
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