diff options
Diffstat (limited to 'Lib/warnings.py')
-rw-r--r-- | Lib/warnings.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/warnings.py b/Lib/warnings.py index fc6154f..dceddde 100644 --- a/Lib/warnings.py +++ b/Lib/warnings.py @@ -27,7 +27,7 @@ def warn(message, category=None, stacklevel=1): else: globals = caller.f_globals lineno = caller.f_lineno - if globals.has_key('__name__'): + if '__name__' in globals: module = globals['__name__'] else: module = "<string>" |