[Python-Dev] copy, len and the like as 'object' methods?

David Ascher DavidA@ActiveState.com
Wed, 22 Aug 2001 18:28:57 -0700

Guido van Rossum wrote:

> AFAICT, the len() method proposal is just an attempt to be more OO,
> and to avoid being made fun of by a bunch of Perlers.  I don't care
> about #1, and it's naive to think that solving one issue will avoid
> #2.

Actually, I couldn't care less about #1 or #2.  Paul and I hold our own
against Perl folks every day =), and I'm not a fan of pure-OO'ness.  I
do try to make _learning_ Python as easy as possible, and
inconsistencies such as this one do get in the way.

People who learn the language ask things like "how do I make a copy of
something?" and the answer to that is currently quite complicated.  It
just gets in the way, and it wastes synapses.

My only point is that if the language were to be designed today, my
guess is that those things would be methods (or interfaces :-).