diff options
author | Guido van Rossum <guido@python.org> | 2001-02-28 22:26:36 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2001-02-28 22:26:36 (GMT) |
commit | 3756fa3e11e4ab002058415537d47878c74d3995 (patch) | |
tree | cd215570319aa1f7954bcc078b03592388ce4965 | |
parent | 74d18ed07666434853b0241f5dc3fd2be96ae203 (diff) | |
download | cpython-3756fa3e11e4ab002058415537d47878c74d3995.zip cpython-3756fa3e11e4ab002058415537d47878c74d3995.tar.gz cpython-3756fa3e11e4ab002058415537d47878c74d3995.tar.bz2 |
Move a comment around to where it belongs (the code had alrady been
moved).
-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 9de64bb..52aee26 100644 --- a/Lib/warnings.py +++ b/Lib/warnings.py @@ -32,7 +32,6 @@ def warn(message, category=None, stacklevel=1): filename = sys.argv[0] if not filename: filename = module - # Quick test for common case registry = globals.setdefault("__warningregistry__", {}) warn_explicit(message, category, filename, lineno, module, registry) @@ -45,6 +44,7 @@ def warn_explicit(message, category, filename, lineno, if registry is None: registry = {} key = (message, category, lineno) + # Quick test for common case if registry.get(key): return # Search the filters |