Python design philosophy

Cees de Groot cg at gaia.cdg.acriter.nl
Wed Jun 28 17:06:41 EDT 2000


Steve Juranich  <sjuranic at condor.ee.washington.edu> said:
> Also, what benefit is gained by allowing a user to
>add/delete members from existing classes?  Wouldn't it be more desirable
>to create his/her own derived class?
>
I've been reading up on aspect-oriented programming (quickstart link
would be www.aspectj.org, although that's a bit Java specific). It makes
a lot of sense to fiddle around with someone else's class code at
run-time. 

Also, don't forget that with dynamically typed languages like Python,
you often aren't interested in types at all, just in the kind of methods
an object offers you. So mixing in methods, even at run-time, can be
a very useful operation in order to make the object accessible to
more other objects (who expect these methods to be present). 

Besides, it's fun.


-- 
Cees de Groot               http://www.cdegroot.com     <cg at cdegroot.com>
GnuPG 1024D/E0989E8B 0016 F679 F38D 5946 4ECD  1986 F303 937F E098 9E8B
Forge your CipherSaber and list it: http://www.xs4all.nl/~cg/ciphersaber/



More information about the Python-list mailing list