Rant (was Re: x*x if x>10

Diez B. Roggisch deets at nospam.web.de
Sun Jul 27 10:57:14 EDT 2008


Marc 'BlackJack' Rintsch schrieb:
> On Sun, 27 Jul 2008 16:41:19 +0200, Diez B. Roggisch wrote:
> 
>> DaveM schrieb:
>>> Getting back to the
>>> list concatenation, I finally found the itertools.chain command which
>>> is the most compact and fastest (or second fastest by a trivial amount,
>>> I can't remember which). Along the way, I must have tried/used half a
>>> dozen methods, ...which brings me back my initial PERL comment. There's
>>> more than one way to do it in Python, too.
>> Any non-trivial task has that property. I don't know enough perl to have
>> an example ready that shows something that python has only one way of
>> doing and perl has several.
>>
>> But I *do* know that taking the python zen literally is fruitless.
> 
> I think it should be taken more literally than the wrong reduction to 
> "there should be only one way".  People tend to forget "obvious" and 
> "preferably" all the time.

Good point. The OP found the obvious way of extending. I wonder what his 
reasons were to abandon it.


Diez



More information about the Python-list mailing list