[Tutor] what is the difference

Michael H. Goldwasser goldwamh at slu.edu
Thu Dec 13 19:39:27 CET 2007


Hi John,

It depends upon whether the "..." code fragment is affected in any way
by the value of self._inFlush.  The first code sample you offer should
be identical to the following.

    if not self._inFlush:
    	self._inFlush = True    # reset this before the ...
    	...
    else:
    	return

With regard,
Michael

On Thursday December 13, 2007, johnf wrote: 

>    if self._inFlush:
>    	return
>    self._inFlush = True
>    ....
>    
>    AND
>    
>    if not self._inFlush:
>    	...
>    	self._inFlush = True
>    else:
>    	return
>    
>    I can not see the difference but the second one acts differently in my code.
>    -- 
>    John Fabiani
>    _______________________________________________
>    Tutor maillist  -  Tutor at python.org
>    http://mail.python.org/mailman/listinfo/tutor



More information about the Tutor mailing list