A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2001-December/019021.html below:

[Python-Dev] regrtest.py mystery

[Python-Dev] regrtest.py mystery [Python-Dev] regrtest.py mysteryTim Peters tim.one@home.com
Mon, 17 Dec 2001 18:36:22 -0500
[/F]
> how do you detect that a module is successfully imported?
>
> the only way I can think of is "execution reached the end of
> the module", which would probably break considerable amounts
> of code that rely on "temporarily recursive" imports.

Presumably Greg's flag would be initialized to "not broken", and set to
"broken" when and only when an uncaught exception is raised.  So in

    import A
    A imports B
        which imports A
        back to B
        B completes
    back to A
    A blows up before completing

A's "broken" flag isn't set until the end, so B's recursive import of A
isn't harmed.




RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4