Use of the "is" statement

Joel Corbin joel.corbin at utoronto.ca
Fri Jun 27 12:03:30 EDT 2008


Thank you Gary, Cédric, Christian. When *would *one use "is"?

Cédric... the problem I was having was purely an issue of comparison.... "if
file.tell() is 0L" was returning False. Strangely enough, "if file.tell() is
0" returns True in the right cases. I assume this is related to the None
case?

On Fri, Jun 27, 2008 at 11:47 AM, Christian Heimes <lists at cheimes.de> wrote:

> Gary Herron wrote:
> > In short:  *never* use "is".
>
> Never use "is" unless you want to check "if something is None or
> something is not None"
>
> Christian
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20080627/e9cdc999/attachment.html>


More information about the Python-list mailing list