[Python-ideas] Null coalescing operators

Stephen J. Turnbull stephen at xemacs.org
Sat Sep 19 14:48:52 CEST 2015


Sven R. Kunze writes:

 > Issue is, None is so convenient to work with. You only find out the
 > code smell when you discover a "NoneType object does not have
 > attribute X"

That's exactly what should happen (analogous to a "signalling NaN").
The problem is if you are using None as a proxy for a NULL in another
subsystem that has "NULL contagion" (I prefer that to "coalescing").

At this point the thread ends for me because I'm not going try to tell
the many libraries that have chosen to translate NULL to None and vice
versa that they are wrong.



More information about the Python-ideas mailing list