[Python-ideas] __missing__ object/keyword

George Sakkis george.sakkis at gmail.com
Sat Nov 8 20:36:26 CET 2008

On Sat, Nov 8, 2008 at 6:36 AM, Michael <fuzzyman at gmail.com> wrote:

This seems to be a solution in search of a problem. If you handle sentinel
> default values early in a function then they are rarely problematic.

The general consensus so far seems to be that None and sentinel values are
good enough in practice and adding a new feature is over-engineering, but I
wouldn't go as far as calling it a solution in search of problem. To me it
looks similar to the motivation for keyword-only arguments; as the PEP
mentions, one can effectively have keyword-only arguments with the idiom:

def compare(a, b, *ignore, key=None):
    if ignore:  # If ignore is not empty
        raise TypeError

Thankfully, this didn't prevent the PEP from being accepted.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20081108/42784959/attachment.html>

More information about the Python-ideas mailing list