mirror of
https://github.com/python/cpython.git
synced 2025-08-01 15:43:13 +00:00
Get rid of a bunch more has_key() uses. We *really* need a tool for this.
test_aepack now passes. IDLE still needs to be converted (among others).
This commit is contained in:
parent
0da7e03e12
commit
f1a69c1666
16 changed files with 109 additions and 112 deletions
|
@ -48,7 +48,7 @@ def need(restype, resid, filename=None, modname=None):
|
|||
if modname == '__main__':
|
||||
# If we're main we look in the current directory
|
||||
searchdirs = [os.curdir]
|
||||
if sys.modules.has_key(modname):
|
||||
if modname in sys.modules:
|
||||
mod = sys.modules[modname]
|
||||
if hasattr(mod, '__file__'):
|
||||
searchdirs = [os.path.dirname(mod.__file__)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue