On 2008-05-17 10:26, Greg Ewing wrote:
Nick Coghlan wrote:

Having to mess around with __import__ just to support a "choose compression method" configuration option would be fairly annoying.

Perhaps, but even then, I'm not sure it makes sense to
lump them all into the same namespace.

Note that only the stdlib codecs are using one flat namespace.

Other codec packages may (and should) register their own codec
search functions and can then easily use other namespaces as well.

Think of the codec registry and access as a highly specialized
module import mechanism.

It is well possible to group codecs in packages and then access
them via their package name, e.g. 'compress.gzip'. However,
in practice, just writing 'gzip' is going to have enough
expressiveness to have a programmer understand what is
happening.

--
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Source  (#1, May 17 2008)
>>> 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 mxODBC.Zope.DA for Windows,Linux,Solaris,MacOSX 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
_______________________________________________
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to