Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3756fa3

Browse files
committed
Move a comment around to where it belongs (the code had alrady been
moved).
1 parent 74d18ed commit 3756fa3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Lib/warnings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ def warn(message, category=None, stacklevel=1):
3232
filename = sys.argv[0]
3333
if not filename:
3434
filename = module
35-
# Quick test for common case
3635
registry = globals.setdefault("__warningregistry__", {})
3736
warn_explicit(message, category, filename, lineno, module, registry)
3837

@@ -45,6 +44,7 @@ def warn_explicit(message, category, filename, lineno,
4544
if registry is None:
4645
registry = {}
4746
key = (message, category, lineno)
47+
# Quick test for common case
4848
if registry.get(key):
4949
return
5050
# Search the filters

0 commit comments

Comments
 (0)