Revisiting PEP 505 – None-aware operators

Regarding the notion that None is not that special: it is special, intentionally. Many places in the standard API use None to means absence of something better – not just d.get(k) but also there are literally tons of APIs that use None to indicate “nothing instead of something”. This convention is deeply ingrained in the language and intentionally so. (And it’s not in conflict with the notion that None itself is still an object – it’s better as an object, so that parts of anybody’s code that don’t care about it being special don’t have to special-case it.)

6 Likes