On Oct 29, 3:20 pm, Bruno Desthuilliers wrote:
> Armando Serrano Lombillo a écrit :
>
> > Why does Python give an error when I try to do this:
>
> >>>> len(object=[1,2])
> > Traceback (most recent call last):
> > File "", line 1, in
>
On Oct 29, 3:10 pm, Duncan Booth <[EMAIL PROTECTED]> wrote:
> Armando Serrano Lombillo <[EMAIL PROTECTED]> wrote:
>
>
>
> > Why does Python give an error when I try to do this:
>
> >>>> len(object=[1,2])
> > Traceback (most recent call las
Why does Python give an error when I try to do this:
>>> len(object=[1,2])
Traceback (most recent call last):
File "", line 1, in
len(object=[1,2])
TypeError: len() takes no keyword arguments
but not when I use a "normal" function:
>>> def my_len(object):
return len(object)
>>> m