[Tutor] Eureka!

Magnus Lyckå magnus at thinkware.se
Sun Feb 29 16:14:00 EST 2004


At 09:59 2004-02-29 -0800, Christopher Spears wrote:
>I copied the UserDict module and created a module
>called UserDict2.  Inside this module, I created the
>following class and definition:

Why did you do that? There is no reason to copy any
standard library files just because you want to subclass
a class in one of them. Except the waste of disk space,
it means that you'll miss bugfixes or performance
improvements that others do in UserDict, and you might
also waste more RAM (and CPU-time) when you run your
program.

Perhaps you can look in the standard libraries to see how
this is normally done. For instance, you can look at the
class definitions in SimpleHTTPServer.py.


--
Magnus Lycka (It's really Lyckå), magnus at thinkware.se
Thinkware AB, Sweden, www.thinkware.se
I code Python ~ The Agile Programming Language 




More information about the Tutor mailing list