[Python-ideas] __missing__ object/keyword

Terry Reedy tjreedy at udel.edu
Sat Nov 8 21:19:50 CET 2008

Bruce Leban wrote:
> The problem with using a value like None as some have proposed is that 
> None may be a valid parameter value.

It usually is not, and when it is, a private object suffices.

> Thus the only safe value is a 
> special value like a throwaway object.

Yes, a private instance of object().

> There *is* one guaranteed way of ensuring that I can't use a variable's 
> value: leaving it unbound.

This Perl, etc. concept does not fit Python's name-object model.  A 
Python mappings and sequences cannot have a key or index without a 
value.  To propose otherwise is a major conceptual change.


More information about the Python-ideas mailing list