From 3756fa3e11e4ab002058415537d47878c74d3995 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Wed, 28 Feb 2001 22:26:36 +0000 Subject: Move a comment around to where it belongs (the code had alrady been moved). --- Lib/warnings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v0.12