Argument of the bool function

Ethan Furman ethan at stoneleaf.us
Sat Apr 9 00:03:37 CEST 2011


candide wrote:
> Le 08/04/2011 18:43, Ian Kelly a écrit :
>> In "bool(x=5)", "x=5" is also not an expression.  It's passing the
>> expression "5" in as the parameter x, using a keyword argument. 
 >>
> You are probably right but how do you deduce this brilliant 
> interpretation from the wording given in the documentation ?

Look at your original post, which contains the excerpt from the docs 
that you put there:
 >
 > bool([x])
 > Convert a value to a Boolean, using the standard truth testing
 > procedure.
 >

As you can see, the parameter name is 'x'.

~Ethan~



More information about the Python-list mailing list