Re: Built-in functions and keyword arguments

2007-10-29 Thread Armando Serrano Lombillo
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 >

Re: Built-in functions and keyword arguments

2007-10-29 Thread Armando Serrano Lombillo
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

Built-in functions and keyword arguments

2007-10-29 Thread Armando Serrano Lombillo
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