[ZODB-Dev] Re: Python module namespace pollution
Jim Fulton
jim at zope.com
Tue Apr 20 05:33:28 EDT 2004
John Belmonte wrote:
> Jim Fulton wrote:
>
>> John Belmonte wrote:
>>
>>> I noticed that 3.3a3 has added another generically-named module to
>>> the top level namespace. Shouldn't the following really be under ZODB?
>>>
>>> persistent
>>> transaction
>>> Persistence
>>>
>>> Before a stable release is made and it's too late, I think that
>>> "persistent" and "transaction" should be moved to the ZODB package.
>>
>>
>> The "transaction" package is indepenent of ZODB. The persistent package
>> wants to be.
>
>
> I don't see why they can't be placed into the ZODB package even if they
> have no dependencies on other modules in the package. Nothing is
> stopping another persistence library, etc., from using them, it is just
> a question of having more installed than you need.
That doesn't make any sense. ZODB is not a container pckage. It makes no
sense to require that someone have ZODB is they only want the transaction
package.
>> We are contemplating using a package named "z" as a container package for
>> packages developed as part of the Zope project. (If your're curious about
>> why, see: http://dev.zope.org/Zope3/RenameTheZopePackage.)
>
>
> In terms of top level namespace pollution, a one letter name is about as
> bad as it gets.
Why do you say that? A bad name in a global namespace is one that is likely
to conflict. Do you think it likely that someone else would pick "z"?
At this point, the latter "z" is associated with Zope within the Python
community. When you see a name beginning with "z", you assume it has something
to do with Zope.
>> How would y'all feel about:
>>
>> z.odb
>> z.transaction
>> z.persistent
>
>
> What about BTrees?
Good point. That would, of course, be "z.btrees".
Jim
--
Jim Fulton mailto:jim at zope.com Python Powered!
CTO (540) 361-1714 http://www.python.org
Zope Corporation http://www.zope.com http://www.zope.org
More information about the ZODB-Dev
mailing list