Mark Hammond wrote: > > > Py_True, of course, *is* 1. There is no proper boolean type. > > Seeing you added emphasis on the *is*, I assume you meant *is* :) > > >>> true=(1==1) > >>> true is 1 > 0 > >>> > > Py_True == 1, but is *not* 1 Py_True is a singleton and all 1 integers in Python are cached and shared, so we end up having exactly two different objects for the number 1 in Python: Py_True and 1 (or 3-2 or 4/4 or ...). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Consulting & Company: http://www.egenix.com/ Python Software: http://www.lemburg.com/python/
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4