Use of the "is" statement

Maric Michaud maric at aristote.info
Fri Jun 27 12:36:04 EDT 2008


Le Friday 27 June 2008 18:26:45 Christian Heimes, vous avez écrit :
> Ask yourself if you are interested if f.tell() returns exactly the same
> 0 object ("is") or a number that is equal to 0 ("==").

That said, "f.tell() == 0" and "f.tell() != 0" should be written "f.tell()" 
and "not f.tell()" in python.

if not f.tell() :
    print 'at the beginning of the file"


-- 
_____________

Maric Michaud



More information about the Python-list mailing list