Argument of the bool function

rusi rustompmody at gmail.com
Sun Apr 10 06:15:44 CEST 2011


On Apr 10, 8:35 am, Grant Edwards <inva... at invalid.invalid> wrote:
> On 2011-04-09, Lie Ryan <lie.1... at gmail.com> wrote:
>
> > On 04/09/11 08:59, candide wrote:
> >> Le 09/04/2011 00:03, Ethan Furman a ?crit :
>
> >>>  > bool([x])
> >> dir([object])
> >> Not very meaningful, isn't it ?
>
> > The error says it unambiguously, dir() does not take *keyword*
> > arguments; instead dir() takes *positional* argument:
>
> >     dir("Explicit is better than implicit")
>
> I think the point is that both cases are documented exactly the same.

In what case(s) would a keyword arg to bool be reasonable?



More information about the Python-list mailing list