Perl is worse!

Martijn Faassen m.faassen at vet.uu.nl
Fri Jul 28 18:04:50 EDT 2000


Steve Lamb <grey at despair.rpglink.com> wrote:
> On Fri, 28 Jul 2000 06:52:19 GMT, Ben Wolfson <rumjuggler at cryptarchy.org>
> wrote:
>>Yes, it does.  List returns the list-equivalent of the sequence passed as
>>its argument.  1 is not a sequence; it doesn't have a list equivalent.

>     1 is a sequence whether Python likes it or not.  I call that a deficiency
> in the language.

Right, so you're saying all objects in Python should be sequences of a 
single element. Now let's take the object [1] (a sequence object). According
to you, this should be a sequence with a single object [[1]], and that
should be a sequence with a single object too, so [[[1]]], and so on
ad infinitum.

So [1][0] should be [1], right? And [1].append(1) should be, um, [[1], 1],
or alternatively [[1, 2]], or it might also be [[[1], [[[1]]]]], if you'd
like.

That's an interesting position, but it's not the way Python works. Python
is self consistent, it's not deficient, and it's also not Perl. Please
point out actual quirks of the language. We thank you.

Regards,

Martijn
-- 
History of the 20th Century: WW1, WW2, WW3?
No, WWW -- Could we be going in the right direction?



More information about the Python-list mailing list