Argument of the bool function

candide candide at free.invalid
Fri Apr 8 12:26:33 EDT 2011


About the standard function bool(), Python's official documentation 
tells us the following :

bool([x])
Convert a value to a Boolean, using the standard truth testing procedure.


In this context, what exactly a "value" is referring to ?


For instance,


 >>> x=42
 >>> bool(x=5)
True
 >>>


but _expression_ :

x=42


has no value.









More information about the Python-list mailing list