]> granicus.if.org Git - python/commitdiff
Move a comment around to where it belongs (the code had alrady been
authorGuido van Rossum <guido@python.org>
Wed, 28 Feb 2001 22:26:36 +0000 (22:26 +0000)
committerGuido van Rossum <guido@python.org>
Wed, 28 Feb 2001 22:26:36 +0000 (22:26 +0000)
moved).

Lib/warnings.py

index 9de64bb95d4e658e738d68235a4464e56a4553ad..52aee2687923422758474833027ecba03669eea9 100644 (file)
@@ -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