On Sun, Mar 6, 2011 at 8:29 PM, Laura Creighton <[email protected]> wrote: > I figure that the fact that None is a singleton is not actually relevant > to this.
It's important because Python promises that None is a singleton at the language level, rather than the implementation level. That's different than using cached values of small integers, since that's a runtime efficiency issue (and therefore implementation specific). That's essential to the recommended practice of testing for None using "is" rather than "=="; it's irrelevant to the general description of "is". -Fred -- Fred L. Drake, Jr. <fdrake at acm.org> "A storm broke loose in my mind." --Albert Einstein _______________________________________________ Doc-SIG maillist - [email protected] http://mail.python.org/mailman/listinfo/doc-sig
