at what complexity, a comparison fails ?

Zentrader zentraders at gmail.com
Mon Dec 31 12:14:57 EST 2007


On Dec 31, 2:45 am, Stef Mientki <stef.mien... at gmail.com> wrote:
> So what I need was something like:
>     if  A != A_prev :
>         ... do something
>         A_prev = A
If A_prev is not declared prior to the if statement, you will get an
error when you try to compare the non-existing variable to A.  This
code will work, at least for the snippet you provided.
     A_prev=""
     if  A != A_prev :
         ... do something
         A_prev = A
Please cut and paste the exact error message in the future.



More information about the Python-list mailing list