I think the core issue is that, whether or not it should be used, APIs already return None values, so a convenience operator might as well be added.
On September 19, 2015 2:09:48 PM CDT, "Sven R. Kunze" <email@example.com> wrote:
On 19.09.2015 14:48, Stephen J. Turnbull wrote:
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
That's exactly what should happen (analogous to a "signalling NaN").
Not my point, Stephen. My point is, you better avoid None (despite its
convenience) because you are going to have a hard time finding its
origin later in the control flow.
Question still stands: is None really necessary to justify the
introduction of convenience operators like "?." etc.?
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").
How would you solve instead?
Python-ideas mailing list
Code of Conduct: http://python.org/psf/codeofconduct/
Sent from my Nexus 5 with K-9 Mail. Please excuse my brevity.