mirror of
https://github.com/python/cpython.git
synced 2025-11-25 04:34:37 +00:00
Move a comment around to where it belongs (the code had alrady been
moved).
This commit is contained in:
parent
74d18ed076
commit
3756fa3e11
1 changed files with 1 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue