What do you tink of a package named "z"? (was Re: [ZODB-Dev]
Re: Python module namespace pollution)
Martijn Faassen
faassen at infrae.com
Fri Apr 23 02:44:23 EDT 2004
Chris Withers wrote:
> To mitigate the namespace issues, how about preceding each top level
> package with Z or z? This is already done for ZPublisher, ZODB, ZDeamon,
> etc, and the eGenix guys do just this for the same reason...
I think using prefixes is really just a hack. Other languages need this
practice because they don't *have* ways to construct namespaces, but
Python certainly does.
Similarly I think it's generally a hack to prefix function names
exported by a module. The module already defines the namespace, and
adding a prefix in the function names is redundant. It's helpful if you
want to use 'from .. import *', but that's generally a bad idea by itself.
Regards,
Martijn
More information about the ZODB-Dev
mailing list