PEP 505: status?

As others noted, the main semantic sticking point was that the specific is None check was seen as too limiting, but the proposals to offer a more flexible underlying protocol based approach (e.g. https://www.python.org/dev/peps/pep-0532 ) were seen as too complicated. (There was also a syntactic sticking point, which is that ??, ?., and ?[] don’t really meet anyone’s definition of “executable pseudocode”, which is a standard we aspire to for new Python syntax)

Something we didn’t seriously consider at the time, but may want to think about now is whether making the short circuiting check be for x == None rather than x is None might offer enough runtime flexibility to get past the "None is special, but it isn’t that special" objection.

While most of the arguments for withdrawing PEP 531 (https://www.python.org/dev/peps/pep-0531/#pep-withdrawal) would also applying to defining PEP 505 that way (since x == None would effectively become the “existence checking protocol” that PEP 531 suggested), it might be more palatable when it’s just adapting an existing protocol to a new purpose, rather than defining a completely new one.

1 Like