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 _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com