[Python-Dev] (class) module names clarification

Greg Ewing greg at cosc.canterbury.ac.nz
Thu Mar 18 20:33:16 EST 2004


"Jewett, Jim J" <jim.jewett at eds.com>:

> The whole point of StringIO is its class.  So if it were rewritten
> in modern style, a user would write:
> 
> 	from userlist import UserList
> 	from stringio import StringIO

That's actually an excellent argument for this convention.
It neatly solves the problem of having a module name the
same as a class defined within it.

It would have been good to have socket.Socket, too.

Maybe alternative names could be provided for these, with
the intention of phasing out use of the old names?

Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury,	   | A citizen of NewZealandCorp, a	  |
Christchurch, New Zealand	   | wholly-owned subsidiary of USA Inc.  |
greg at cosc.canterbury.ac.nz	   +--------------------------------------+



More information about the Python-Dev mailing list