[Python-Dev] Great Renaming? What is the goal?

Moshe Zadka Moshe Zadka <mzadka@geocities.com>
Mon, 27 Mar 2000 09:09:18 +0200 (IST)


On Mon, 27 Mar 2000, Peter Funk wrote:

> If the result of this renaming initiative will be that I can't use
> 	import sys, os, time, re, struct, cPickle, parser
> 	import Tkinter; Tk=Tkinter; del Tkinter
> anymore in Python 1.x and instead I have to change this into (for example):
> 	form posix import time

from time import time

> 	from text import re
> 	from bin import struct
> 	from Python import parser
> 	from ui import Tkinter; ...

Yes.

> I would really really *HATE* this change!

Well, I'm sorry to hear that -- I'm waiting for this change to happen
for a long time.

> [side note:
>   The 'from MODULE import ...' form is evil and I have abandoned its use
>   in favor of the 'import MODULE' form in 1987 or so, as our Modula-2
>   programs got bigger and bigger.  With 20+ software developers working
>   on a ~1,000,000 LOC of Modula-2 software system, this decision
>   proofed itself well.

Well, yes. Though syntactically equivalent,

from package import module

Is the recommended way to use packages, unless there is a specific need.

> May be I didn't understand what this new subdivision of the standard
> library should achieve.  

Namespace cleanup. Too many toplevel names seem evil to some of us.

> Why is a subdivision on the documentation level not sufficient?  
> Why should modules be moved into packages?  I don't get it.

To allow a greater number of modules to live without worrying about
namespace collision.
--
Moshe Zadka <mzadka@geocities.com>. 
http://www.oreilly.com/news/prescod_0300.html
http://www.linux.org.il -- we put the penguin in .com