
Nov. 6, 2008
9:18 p.m.
From: "George Sakkis" <george.sakkis@gmail.com>
It would be nice if a new object or keyword, say __missing__, was introduced as a canonical way to address this common scenario. Specifically, the only valid usages of __missing__ would be: 1. As a default argument in a callable. 2. In identity tests: <var> is __missing__ Anything else would raise either a SyntaxError (e.g. `x = __missing__`) or a RuntimeError/TypeError (e.g. `x = y` if y is __missing__). Only the interpreter could assign __missing__ to a name when binding objects to formal parameters.
It would be nice to not introduce a new language feature for every minor programming idiom. IMO, growing the language with more special cases does not make it easier to learn and use. Raymond