A Python 3000 Question
Marc 'BlackJack' Rintsch
bj_666 at gmx.net
Tue Oct 30 03:58:38 EDT 2007
On Mon, 29 Oct 2007 19:50:14 -0700, George Sakkis wrote:
> On Oct 29, 5:49 pm, "Terry Reedy" <tjre... at udel.edu> wrote:
>
>> | why not a_string.len()?
>>
>> You are free to bypass builtins and call methods directly if you like:
>> a_string.__len__().
>>
>> But consider rewriting the following:
>>
>> def table(func, seq):
>> return zip(seq, map(func,seq))
>>
>> table(len, ('', (), []))
>
> table(lambda x:x.__len__(), ('',[],()))
>
> What was the point again ?
Beautiful is better than ugly!? ;-)
Ciao,
Marc 'BlackJack' Rintsch
More information about the Python-list
mailing list