Perl is worse! (was: Python is Wierd!)

Grant Edwards ge at nowhere.none
Fri Jul 28 10:03:00 EDT 2000


In article <Pine.GSO.4.10.10007281010300.4194-100000 at sundial>, Moshe Zadka wrote:
>On Fri, 28 Jul 2000, Grant Edwards wrote:
>
>> >list() (and tuple()) only work on objects that actually have a
>> >sequence mapping makes a lot of sense and, to me, resolves the
>> >ambiguity in precisely the way I would expect.
>
>> Is 'sequence mapping' for list() an tuple() defined the same as
>> for the 'for' statement: it has a get_item(i) method that
>> returns either a value or raises an exception?
>
>Actually, I think these two want an __len__ method too.

At this point somebody is required to complain about the
vagueness of Python interfaces, and if there was some sort of
language facility for defining the interface for a "sequence"
then I wouldn't have had to ask that question.

Since it's Friday, and the person assigned to the task of
complaining about interfaces is off today, I've filled in
temporarily.  But I'm goign golfing at noon, so if you want to
argue about it you'll have to make an appointment with the
regular staff on Monday.  Since I'm just filling in, all I'd be
able to provide is rote contridiction -- which we all know
isn't a real argument...

-- 
Grant Edwards                   grante             Yow!  HUGH BEAUMONT died
                                  at               in 1982!!
                               visi.com            



More information about the Python-list mailing list