Difference between 'is' and '=='
joel.hedlund at gmail.com
Tue Mar 28 11:31:23 CEST 2006
> This does *not* also mean constants and such:
> >>> a = 123456789
> >>> a == 123456789
> >>> a is 123456789
I didn't mean that kind of constant. I meant named constants with defined
meaning, as in the example that I cooked up in my post. More examples: os.R_OK,
or more complex ones like mymodule.DEFAULT_CONNECTION_CLASS.
Sorry for causing unneccessary confusion.
More information about the Python-list