<div dir="ltr">As Serhiy notes, Python's None value fails when trying to use it. In contrast, SQL's NULL does not fail and instead the NULL propagates. Note that this is not what Serhiy actually proposed. I can see that he wants Everything to be essentially an empty value for + and * but no idea why Everything < 3 is True. Unless of course he meant Everything <3 (the emoticon). :-)<div>
<br></div><div>None + 3 => exception</div><div>NULL + 3 => NULL</div><div><br></div><div>In some sense, None is related to BOTTOM (<span style="color:rgb(0,0,0);font-family:sans-serif;font-size:12.800000190734863px;line-height:19.200000762939453px">⊥</span>) and NULL is related to TOP (<span style="color:rgb(0,0,0);font-family:sans-serif;font-size:12.800000190734863px;line-height:19.200000762939453px">⊤</span>). While I've sometimes wanted a None-like object that would not raise exceptions when operated on, I've usually thought it better to create an object that ignored specific expected operations not everything.</div>
<div><br></div><div>Is there a use case or is this just an abstract idea?</div><div><br></div></div><div class="gmail_extra"><br clear="all"><div><div dir="ltr"><font face="arial, helvetica, sans-serif">--- Bruce<br></font><div>
<div><font face="arial, helvetica, sans-serif">Learn how hackers think: <a href="http://j.mp/gruyere-security" target="_blank">http://j.mp/gruyere-security</a></font></div></div></div></div>
<br><br><div class="gmail_quote">On Tue, Feb 18, 2014 at 11:27 AM, Guido van Rossum <span dir="ltr"><<a href="mailto:guido@python.org" target="_blank">guido@python.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">This idea comes up occasionally (though I've never heard it named "everything" before). I believe it is similar to a feature in Objective-C (or maybe just Apple's version) where the behavior is that if you send any message to nil it does nothing and returns nil.<br>
<br>In Python I think it would be very disturbing though and would end up masking errors. (Python and ObjC seems to have very different attitudes about exceptions -- in Python they are used all the time while in ObjC the culture seems to favor the idea that exceptions are fatal and shouldn't even be caught.)<br>
</div><div class="gmail_extra"><div><div class="h5"><br><br><div class="gmail_quote">On Tue, Feb 18, 2014 at 11:09 AM, Amber Yust <span dir="ltr"><<a href="mailto:amber.yust@gmail.com" target="_blank">amber.yust@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Your examples do not make sense to me.<div><div><br><br><div>On Tue Feb 18 2014 at 11:08:00 AM, Serhiy Storchaka <<a href="mailto:storchaka@gmail.com" target="_blank">storchaka@gmail.com</a>> wrote:</div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
This crazy idea is inspired by a discussing in Python-Dev which should<br>
be here.<br>
<br>
Currently we have a None singleton which representing nothing and raises<br>
an exception in almost all operations (except equality, etc). What about<br>
introducing its antonym, an Everything singleton (the name is<br>
discussable), which newer raises an exception in any operation, but<br>
returns consistent value?<br>
<br>
>>> Everything + 2<br>
2<br>
>>> Everything < 3<br>
True<br>
>>> Everything * 'foo'<br>
'foo'<br>
<br>
______________________________<u></u>_________________<br>
Python-ideas mailing list<br>
<a href="mailto:Python-ideas@python.org" target="_blank">Python-ideas@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/python-ideas" target="_blank">https://mail.python.org/<u></u>mailman/listinfo/python-ideas</a><br>
Code of Conduct: <a href="http://python.org/psf/codeofconduct/" target="_blank">http://python.org/psf/<u></u>codeofconduct/</a><br>
</blockquote>
</div></div><br>_______________________________________________<br>
Python-ideas mailing list<br>
<a href="mailto:Python-ideas@python.org" target="_blank">Python-ideas@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/python-ideas" target="_blank">https://mail.python.org/mailman/listinfo/python-ideas</a><br>
Code of Conduct: <a href="http://python.org/psf/codeofconduct/" target="_blank">http://python.org/psf/codeofconduct/</a><br></blockquote></div><br><br clear="all"><br></div></div><span class="HOEnZb"><font color="#888888">-- <br>
--Guido van Rossum (<a href="http://python.org/~guido" target="_blank">python.org/~guido</a>)
</font></span></div>
<br>_______________________________________________<br>
Python-ideas mailing list<br>
<a href="mailto:Python-ideas@python.org">Python-ideas@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/python-ideas" target="_blank">https://mail.python.org/mailman/listinfo/python-ideas</a><br>
Code of Conduct: <a href="http://python.org/psf/codeofconduct/" target="_blank">http://python.org/psf/codeofconduct/</a><br></blockquote></div><br></div>