On Thursday 06 January 2011 21:23:57 Robert Kern wrote: > On 1/6/11 12:43 PM, Erwin Mueller wrote: > > 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. > > Modules *should* have several pages of code. *Functions* should be limited > to about a page of code at maximum.
I'm not quite familar with Python development, but why should modules be so big that the user is lost in the code? What is preventing you from splittin a module in several files, each file with a single responsibility? -- Erwin Mueller, dev...@deventm.org http://www.global-scaling-institute.de/ -- http://mail.python.org/mailman/listinfo/python-list