On Thu, Jul 26, 2018 at 2:14 AM, Schachner, Joseph
<joseph.schach...@teledyne.com> wrote:
> While I appreciate that use of "is" in   thing is None, I claim this relies 
> on knowledge of how Python works internally, to know that every None actually 
> is the same ID (the same object) - it is singular.

That's part of the *definition* of None. It is a singleton. There is
only one None.

> That probably works for 0 and 1 also but you probably wouldn't consider 
> testing   thing is 1, at least I hope you wouldn't.  thing is None looks just 
> as odd to me.  Why not thing == None ?  That works.
>

That's not guaranteed, because integers are not guaranteed to be
singletons. They're compared by value.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to