ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> Jython-users
Jython-users
[Jython-users] partial imports
by other posts by this author
Feb 27 2002 10:03PM messages near this date
Re: [Jython-users] Example of Java class reloading | Re: [Jython-users] partial imports
This might be more of a python question, but here goes anyway.  If I 
import a module that has an error in it, the import correctly fails.  But 
if I then import the same module again, the import succeeds, and the only 
attributes on that module are those that were processed before the failure 
was hit.  Is this correct behavior?  It seems very dangerous.
e.g.

<a.py> 
foo='foo'
errorhere
bar='bar'

<interactive> 
> >> import a
...NameError...
> >> import a
> >> a.foo
'foo'
> >> a.bar
.. AttributeError...



Matt


_______________________________________________
Jython-users mailing list
Jython-users@[...].net
https://lists.sourceforge.net/lists/listinfo/jython-users
Thread:

Samuele Pedroni
Kevin Butler

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved