This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: warn about import * inside functions
Type: Stage:
Components: Interpreter Core Versions: Python 2.2
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: jhylton Nosy List: gvanrossum, jhylton
Priority: normal Keywords:

Created on 2001-07-28 13:54 by gvanrossum, last changed 2022-04-10 16:04 by admin. This issue is now closed.

Messages (4)
msg5647 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2001-07-28 13:54
According to the reference manual, import * is now only
allowed at the module level. This is not enforced. We
should add a warning for this.
msg5648 - (view) Author: Jeremy Hylton (jhylton) (Python triager) Date: 2001-08-01 20:53
Logged In: YES 
user_id=31392

Do you really want to get a warning about this?  Last time
it came up, we discovered that you were the most common user
of this feature in Python.  Fredrik also said he used it a
lot, not surprising since the most common idiom is:

def test():
    from Tkinter import *

msg5649 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2001-08-01 20:56
Logged In: YES 
user_id=6380

Yes, let's get this over with.

If I really hate it I'll rip it out myself, but more likely
I'll fix my code. :-)
msg5650 - (view) Author: Jeremy Hylton (jhylton) (Python triager) Date: 2001-08-06 19:47
Logged In: YES 
user_id=31392

Fixed in rev. 2.209 of compile.c; based on earlier, reverted
fix in rev 2.155.
History
Date User Action Args
2022-04-10 16:04:15adminsetgithub: 34849
2001-07-28 13:54:25gvanrossumcreate