From: Russo, T. <to...@st...> - 2002-02-15 15:36:40
|
Hi Oti (et al), Changing the names of the formal parameters does not seem to help; it just complains about whatever I change it to being an unbound local. I've tried the code with several versions of CPython (2.0 and 2.1 for windows, and 2.1 w/ cygwin) and it works as expected on all of them; jython seems to be the only one that fails. Can anyone else replicate this behavior? _t > > Hello Tom, > > heavily guessing (I did not try your code)... > > Guess #1: > Maybe you use another CPython version (different from 2.1) > > Guess #2: > Try renaming the parameters like this (since globals/locals are > functions you might get a sort of name clash): > > def import_hook(name, globaldict=None, localdict=None, fromlist=None): > return original_import(name, globaldict, localdict, fromlist) > > instead of your version below. I faintly remember a very similar > problem go away using different parameter names. > > Lucky if this solves your problem, but no guarantee at all ! > Best wishes, > Oti. > > > [ Russo, Tom ] > > <snipped > > > > def import_hook(name, globals=None, locals=None, fromlist=None): > > return original_import(name, globals, locals, fromlist) > # > > this is where the error occurs > > > __________________________________________________ > Do You Yahoo!? > Send FREE Valentine eCards with Yahoo! Greetings! > http://greetings.yahoo.com > > _______________________________________________ > Jython-users mailing list > Jyt...@li... > https://lists.sourceforge.net/lists/listinfo/jython-users > |