[Python-bugs-list] [ python-Bugs-445474 ] warn about import * inside functions

noreply@sourceforge.net noreply@sourceforge.net
Mon, 06 Aug 2001 12:47:08 -0700


Bugs item #445474, was opened at 2001-07-28 06:54
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=445474&group_id=5470

Category: Parser/Compiler
Group: Python 2.2
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Guido van Rossum (gvanrossum)
Assigned to: Jeremy Hylton (jhylton)
Summary: warn about import * inside functions

Initial Comment:
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.


----------------------------------------------------------------------

>Comment By: Jeremy Hylton (jhylton)
Date: 2001-08-06 12:47

Message:
Logged In: YES 
user_id=31392

Fixed in rev. 2.209 of compile.c; based on earlier, reverted
fix in rev 2.155.

----------------------------------------------------------------------

Comment By: Guido van Rossum (gvanrossum)
Date: 2001-08-01 13:56

Message:
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. :-)

----------------------------------------------------------------------

Comment By: Jeremy Hylton (jhylton)
Date: 2001-08-01 13:53

Message:
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 *



----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=445474&group_id=5470