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

2011-01-07 Thread Carl Banks
On Jan 6, 8:32 am, Tim Harig wrote: > 2. Your so-called PEP probably clashes with Python's use of @ for >         decorators. He said it was just for simplicity's sake. Carl Banks -- http://mail.python.org/mailman/listinfo/python-list

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

2011-01-07 Thread Carl Banks
On Jan 6, 7:28 am, 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

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

2011-01-06 Thread Steven D'Aprano
On Thu, 06 Jan 2011 21:05:10 -0800, Chris Rebert wrote: > On Thu, Jan 6, 2011 at 8:00 PM, Erwin Mueller > wrote: >> 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, >> >

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

2011-01-06 Thread Chris Rebert
On Thu, Jan 6, 2011 at 8:00 PM, Erwin Mueller wrote: > 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 pr

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

2011-01-06 Thread Erwin Mueller
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 t

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

2011-01-06 Thread Erwin Mueller
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 t

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

2011-01-06 Thread Steven D'Aprano
On Thu, 06 Jan 2011 09:03:02 -0800, Ian wrote: > On Jan 6, 9:32 am, Tim Harig wrote: >> 2. Your so-called PEP probably clashes with Python's use of @ for >>         decorators. >> >> 3. Do you really expect a language holding the mantra that there should >> be >>         a single way of doing thi

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

2011-01-06 Thread Alan Meyer
On 1/6/2011 10:28 AM, 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

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

2011-01-06 Thread Robert Kern
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 MyMo

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

2011-01-06 Thread dmitrey
On Jan 6, 8:43 pm, Erwin Mueller wrote: > > 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, dev...@deventm.orghttp://www.global-scaling-institute.de/ Erwin, take a look at Python language dev

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

2011-01-06 Thread Erwin Mueller
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

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

2011-01-06 Thread Tim Chase
On 01/06/2011 10:32 AM, Tim Harig wrote: 2. Your so-called PEP probably clashes with Python's use of @ for decorators. 3. Do you really expect a language holding the mantra that there should be a single way of doing things to embrace a language bloating feature for what i

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

2011-01-06 Thread Ian
On Jan 6, 9:32 am, Tim Harig wrote: > 2. Your so-called PEP probably clashes with Python's use of @ for >         decorators. > > 3. Do you really expect a language holding the mantra that there should be >         a single way of doing things to embrace a language bloating feature >         for w

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

2011-01-06 Thread Mike Kent
On Jan 6, 11:02 am, Duncan Booth wrote: > Your complaint seems to be that: > >    r1 = myFunc1(...) > > is unclear when you don't know where myfunc1 originates, so why don't > you write: > >    r1 = MyModule1.myFunc1(...) > > -- > Duncan Boothhttp://kupuguy.blogspot.com My interpretation of his

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

2011-01-06 Thread Tim Harig
On 2011-01-06, dmitrey wrote: [re-ordered] > On Jan 6, 5:57 pm, Tim Harig wrote: >> Python doesn't require imports to be at the top of a file.  They can be >> imported at any time. >> >> > import MyModule >> > (...lots of code...) >> > r = MyModule.myFunc(...) >> >> (...lots of code...) >> import

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

2011-01-06 Thread dmitrey
Yes, I know, still usually it is placed in file header On Jan 6, 5:57 pm, Tim Harig wrote: > Python doesn't require imports to be at the top of a file.  They can be > imported at any time. > > > import MyModule > > (...lots of code...) > > r = MyModule.myFunc(...) > > (...lots of code...) > impor

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

2011-01-06 Thread Duncan Booth
dmitrey wrote: > e.g. instead of > > import MyModule > (...lots of code...) > r = MyModule.myFunc(...) > > someone could just type in the single place > > r = @MyModule.myFunc(...) > > Also, "import MyModule2 as mm2" could be replaced to mere > mm2 = @MyModule2 > and "from MyModule3 import my

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

2011-01-06 Thread Tim Harig
On 2011-01-06, dmitrey wrote: > and after several pages of code they are using somewhere, maybe only > one time, e.g. [SNIP] > It makes programs less clear, you have to scroll several pages of code > in IDE to understand what it refers to. Python doesn't require imports to be at the top of a file

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

2011-01-06 Thread dmitrey
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