PEP305 csv package: from csv import csv?

Cliff Wells LogiplexSoftware at earthlink.net
Thu Apr 10 12:56:42 EDT 2003


On Wed, 2003-04-09 at 17:03, Magnus Lie Hetland wrote:

> csv.py, right? (I consistently make this mistake myself...)

It gets worse when you've been typing "csv" for an hour then try to
commit the work to cvs ;)

> As for reasons -- the checkin message for the __init__.py (made by
> Cliff Wells) is:
> 
>   "Make cvs [sic] into a package so we can have a util package"

See?

> So it seems that prior to this decision, csv was simply a module, and

Yep.

> the names were directly available. I'd think this to be preferrable,
> and more consistent with existing library modules. We may have modules
> containing classes with the same name, but this convention of placing
> a module inside a package with the same name does not occur at all in
> the libs. (Yes, I checked ;)

We needed to have a sub-package (util) and that required having csv
itself as a package (unless someone knows how to get around this - my
knowledge of the import system is fairly limited).

> Of my currently installed packages, I see that numarray uses the
> convention, for example, in its RandomArray2 module/package. However,
> it also uses the above suggested convention of placing
> 
>   from RandomArray2 import *
> 
> in RandomArray/__init__.py.
> 
> So ... Are any of the PEP authors reading this? (Just checking -- as
> this probably belongs on the discussion list... Sorry about that ;)

Skip has this on his list.

Regards,

-- 
Cliff Wells, Software Engineer
Logiplex Corporation (www.logiplex.net)
(503) 978-6726 x308  (800) 735-0555 x308






More information about the Python-list mailing list