Re: Use of the "is" statement

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Maric Michaud

    Re: Use of the "is" statement

    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
Working...