Issue222834

classification
Title: import * into locals
Type: Severity: normal
Components: Core Versions:
Milestone:
process
Status: closed Resolution: later
Dependencies: Superseder:
Assigned To: Nosy List: bckfnn, pedronis
Priority: low Keywords: test failure causes

Created on 2000-11-18.19:23:13 by bckfnn, last changed 2001-05-27.18:58:39 by pedronis.

Messages
msg113 (view) Author: Finn Bock (bckfnn) Date: 2000-11-18.19:23:13
A minor difference between CPython and JPython. Wildcard import into 
a local namespace does not make the imported names available.


def foo():
    from stat import *
    print locals().keys()
    print ST_MTIME

foo()
msg114 (view) Author: Finn Bock (bckfnn) Date: 2000-12-06.20:57:59
Fixed in:
SimpleCompiler.py revision: 2.11;
LocalsCompiler.java revision: 2.5;
CodeCompiler.java revision: 2.8;
msg115 (view) Author: Finn Bock (bckfnn) Date: 2000-12-17.13:35:12
The patch to SimpleCompiler shows some unfortunate side effects. The generated code is correct, but the interpreting part of jythonc fails to lookup a name used in a function in the globals. I'm backing out the patch (only to jythonc) and reopening the bug.
msg116 (view) Author: Samuele Pedroni (pedronis) Date: 2001-05-27.18:58:39
Logged In: YES 
user_id=61408

nested scopes code both in jython and jythonc deals
properly with this.
History
Date User Action Args
2000-11-18 19:23:13bckfnncreate