[Python-3000] [stdlib-sig] PEP 3108 - stdlib reorg/cleanup

Nick Coghlan ncoghlan at gmail.com
Tue Apr 29 14:07:26 CEST 2008


Raymond Hettinger wrote:
>> * UserList/UserString [done: 3.0]
> 
> Note that these were updated and moved to the collections module in Py3.0. 
> 
> 
>> anydbm             dbm.tools [1]_
>> whichdb            dbm.tools [1]_
> 
> Were there any better naming suggestions than dbm.tools?  The original 
> names seem much more informative.

Maybe they're more informative if you've been using them for a long 
time. As a non-DB-API user, anydbm seems just as generic to me as 
dbm.tools, and whichdb.whichdb is just redundant.

dbm.tools.open and dbm.tools.whichdb seem fine as names for the functions.

>> For modules that are renamed, stub modules will be created with the
>> original names and be kept in a directory within the stdlib (e.g. like
>> how lib-old was once used). 
> 
> What is the purpose of the new directory?  Are there some use
> cases for intermixing the new and old names?  Is there something
> that the 2-to-3 converter won't be able to handle?

The reason is noted in the PEP - it's to keep case insensitive 
filesystems (such as NTFS) from spitting the dummy when we try to put 
both a ConfigParser.py (old name) and configparser.py (new name) in the 
Python Lib directory.

I'd like to see the PEP address the question of how it is going to deal 
with getting duplicate copies of modules in sys.modules when some code 
in an application uses the old name and some code uses the new name.

On the proposed name changes themselves - excellent work!

Cheers,
Nick.


-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia
---------------------------------------------------------------
             http://www.boredomandlaziness.org


More information about the Python-3000 mailing list