[Patches] [ python-Patches-711448 ] Warn about inter-module assignments shadowing builtins

SourceForge.net noreply@sourceforge.net
Fri, 28 Mar 2003 09:15:11 -0800


Patches item #711448, was opened at 2003-03-28 17:12
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=711448&group_id=5470

Category: Core (C code)
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Neil Schemenauer (nascheme)
Assigned to: Nobody/Anonymous (nobody)
Summary: Warn about inter-module assignments shadowing builtins

Initial Comment:
The attached patch modifies module tp_setattro to warn
about
code that adds a name to the globals of another module that
shadows a builtin.  Unfortunately, there are other ways to
modify module globals (e.g. using vars() and mutating the
dictionary).

There are a few issues with module objects that I'm not
clear
about.  For example, do modules always have a md_dict that
is a PyDictObject?

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

>Comment By: Neil Schemenauer (nascheme)
Date: 2003-03-28 17:15

Message:
Logged In: YES 
user_id=35752

Attaching patch.

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

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=711448&group_id=5470