PEP: possibility of inline using of a symbol instead of "import"

Erwin Mueller devent at deventm.org
Thu Jan 6 13:43:29 EST 2011


On Thursday 06 January 2011 16:28:49 dmitrey wrote:
> hi all,
> I have th PEP (I'm not sure something like that hadn't been proposed
> although):
> very often in a Python file header the following lines are present,
> like:
> from MyModule1 import myFunc1
> import MyModule2 as mm2
> from MyModule3 import myFunc3 as mf3
> etc
> 
> and after several pages of code they are using somewhere, maybe only
> one time, e.g.
> r1 = myFunc1(...)
> r2 = mm2.myFunc2(...)
> r3 = mf3(...)
> It makes programs less clear, you have to scroll several pages of code
> in IDE to understand what it refers to.
> 
> Regards, D.

Why you have several pages of code in the first place? Don't you know that you 
can split your code in files? Just a suggestion.

-- 
Erwin Mueller, devent at deventm.org
http://www.global-scaling-institute.de/



More information about the Python-list mailing list