Re: [Tutor] imported scope

2009-04-29 Thread Kent Johnson
On Wed, Apr 29, 2009 at 10:54 AM, spir wrote: > Le Wed, 29 Apr 2009 10:05:04 -0400, > Kent Johnson s'exprima ainsi: >> There is some discussion here: >> http://mail.python.org/pipermail/python-3000/2007-March/006161.html >> >> Short answer: __builtins__ is an implementation detail that you should

Re: [Tutor] imported scope

2009-04-29 Thread Kent Johnson
On Wed, Apr 29, 2009 at 9:56 AM, spir wrote: > Hello, > > I have an issue with scopes (namespaces). > Say I have a source file 'test.py' with the single line: >   print vars()         # same with locals() > > Now, from the command-line: > > s...@o:~/prog/pijnu$ python test.py > {'__builtins__': ,

[Tutor] imported scope

2009-04-29 Thread spir
Hello, I have an issue with scopes (namespaces). Say I have a source file 'test.py' with the single line: print vars() # same with locals() Now, from the command-line: s...@o:~/prog/pijnu$ python test.py {'__builtins__': , '__name__': '__main__', '__file__': 'test.py', '__doc__': Non