[stdlib-sig] Breaking out the stdlib
mal at egenix.com
Tue Sep 15 20:42:21 CEST 2009
Michael Foord wrote:
> M.-A. Lemburg wrote:
>> Please note that adding functionality to such class "C" module
>> is still allowed - provided it doesn't break anything. This has
>> been done with optparse and getopt a few times already and
>> is common practice with other such modules as well.
>> In Laura's particular case, there does appear to be an easy
>> solution which adds just that one feature:
>> Things do get problematic if you want to approach a problem
>> from a whole new angle, e.g. say you want to have XML DOM
>> parsing instead of SAX parsing.
>> In such a case, adding a whole new module would be better.
>> Even though you're still parsing XML in both cases, the new
>> module would provide a new method to do so. Much like the
>> urllib2 provides a new and different way to handle URL
>> fetching compared to urllib.
>> There's also a third case: If a module cannot be updated
>> or extended to support a major new feature mandated by
>> the Python language, such as Unicode support, then there
>> is little choice other than to replace it with a new module.
>> This has happened with the pcre module that used to drive
>> the re module - there was no way to get Unicode into pcre.
>> The change was not really noticeable to the users, though,
>> since the new module implemented the same API (and extended
> Modules are also deprecated wholesale where their functionality is
> replaced by an alternative API.
> md5 -> hashlib
> mimewriter -> email
> This is already a normal part of the evolution of the Python standard
And that's perfectly ok.
If the change is a single import statement, then I don't have a
problem with that.
I also don't have a problem with having a module called
optparse, which, under the hood, uses argparse to provide
the optparse API.
I do have a problem with having to revisit the design of
all scripts using a deprecated module in order to adapt
it to some new, apparently deemed better, stdlib module,
without any benefit, just in order to get the
implementation or script working again.
That's wasted time, really. And given that some modules are
in wide-spread use that scales up wasting the time of
thousands of other programmers out there.
Professional Python Services directly from the Source (#1, Sep 15 2009)
>>> Python/Zope Consulting and Support ... http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
::: Try our new mxODBC.Connect Python Database Interface for free ! ::::
eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48
D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
Registered at Amtsgericht Duesseldorf: HRB 46611
More information about the stdlib-sig