[Python-Dev] copy, len and the like as 'object' methods?
Guido van Rossum
guido@python.org
Wed, 22 Aug 2001 22:33:02 -0400
> 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.
This one seems to be something that you stumble over once, and then
get used to.
> 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.
Maybe they are asking the wrong question. I think that copying isn't
all that important in Python -- that's why it's in a module.
> My only point is that if the language were to be designed today, my
> guess is that those things would be methods (or interfaces :-).
Sure. But they're not so broken as to warrant a redesign. There are
more important battles.
--Guido van Rossum (home page: http://www.python.org/~guido/)