[Python-ideas] Make `import a.b.c as m` is equivalent to `m = sys.modules['a.b.c']`

2017-04-07 Thread Victor Varvariuc
Hi there. I asked a question on Stackoverflow: (Pdb) import brain.utils.mail (Pdb) import brain.utils.mail as mail_utils *** AttributeError: module 'brain.utils' has no attribute 'mail' I always thought that import a.b.c as m i

Re: [Python-ideas] Make `import a.b.c as m` is equivalent to `m = sys.modules['a.b.c']`

2017-04-09 Thread Victor Varvariuc
Thanks for the reply. CC'ing the mailing list. > On 9 Apr 2017, at 10:05, Nick Coghlan wrote: > > On 9 April 2017 at 16:13, Victor Varvariuc wrote: >> I think there are can be several ways to achieve the result. >> >> The question is if what I've prese

Re: [Python-ideas] Make `import a.b.c as m` is equivalent to `m = sys.modules['a.b.c']`

2017-04-09 Thread Victor Varvariuc
The issue: http://bugs.python.org/issue30024 <http://bugs.python.org/issue30024> > On 9 Apr 2017, at 10:05, Nick Coghlan wrote: > > On 9 April 2017 at 16:13, Victor Varvariuc wrote: >> I think there are can be several ways to achieve the result. >> >> The ques