Skip to content

Commit

Permalink
Move a comment around to where it belongs (the code had alrady been
Browse files Browse the repository at this point in the history
moved).
  • Loading branch information
gvanrossum committed Feb 28, 2001
1 parent 74d18ed commit 3756fa3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Lib/warnings.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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
Expand Down

0 comments on commit 3756fa3

Please sign in to comment.