How to fix Python
For a long time I thought I’m the only person disliking the stdlib, but apparently there are more :-) Not just that every library has it’s own code style, it also has different names, some are implemented insanely bad (Cookie.py anyone?) or Javaish (threading, unittest) or just plain stupid (codeop). I know we can’t just get rid of that stdlib, wait a moment, why can’t we? Python 3 is upcoming and we all have to adapt our libraries and applications anyways.
It wouldn’t be too hard actually. Python loads modules from zip files anyways. Just move all the stuff into a zip file, move it into “old” or somethign and old applications just have to alter their imports “from cgi import escape” to “from old.cgi import escape”. Or the other way round, the old libraries stay where they are and the new stdlib goes into “py.*” or “std.*”.
Insane or a good idea? You be the judge.
Little bit too late for such a change, hein?
Comment by john — Thursday, January 10th, 2008 @ 4:46 pmThere is a difference between wiping out the stdlib entirely and cleaning it up. While some things definitely need removal or a re-implementation, I don’t think the stdlib needs to go entirely. That would put us worse off than C where you have to hunt down various 3rd-party libraries, try to figure out which ones are good, etc.
And you don’t need to wait until Python 3.0 to come up with new modules and begin getting rid of old ones. People just need to write up a better implementation and be willing to maintain it in the stdlib.
Comment by Brett — Friday, January 11th, 2008 @ 1:46 amAlso, it’s not really that bad (”every library has it’s own code style”…) — most libraries at least follow PEP 8, and the javaNaming isn’t so widespread that we couldn’t fix it for Py3k.
And as Brett says, if you got a working replacement for any badly implemented module and are willing to maintain it, there’s almost nothing preventing replacing it.
Comment by Georg — Friday, January 11th, 2008 @ 9:40 am