G
Greg Corradini
Hello all,
I'm having trouble understanding why the following code evaluates as it
does:
-1
In the 2.4 Python Reference Manual, I get the following explanation for the
'and' operator in 5.10 Boolean operations:
" The expression x and y first evaluates x; if x is false, its value is
returned; otherwise, y is evaluated and the resulting value is returned."
Based on what is said above, shouldn't my first expression (
string.find('0200000914A','.') and len('0200000914A') > 10) evaluate to
false b/c my 'x' is false? And shouldn't the second expression evaluate to
True?
Thanks for your help
Greg
I'm having trouble understanding why the following code evaluates as it
does:
-1
In the 2.4 Python Reference Manual, I get the following explanation for the
'and' operator in 5.10 Boolean operations:
" The expression x and y first evaluates x; if x is false, its value is
returned; otherwise, y is evaluated and the resulting value is returned."
Based on what is said above, shouldn't my first expression (
string.find('0200000914A','.') and len('0200000914A') > 10) evaluate to
false b/c my 'x' is false? And shouldn't the second expression evaluate to
True?
Thanks for your help
Greg