PEP: possibility of inline using of a symbol instead of "import"
Tim Harig
usernet at ilthio.net
Thu Jan 6 11:32:31 EST 2011
On 2011-01-06, dmitrey <dmitrey.kroshko at scipy.org> wrote:
[re-ordered]
> On Jan 6, 5:57 pm, Tim Harig <user... at ilthio.net> 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 MyModule
>> r = MyModule.myFunc(...)
>
> Yes, I know, still usually it is placed in file header
1. Don't top post.
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 is effectively already possible with the language as it
exists?
More information about the Python-list
mailing list