Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
3756fa3e
Commit
3756fa3e
authored
Feb 28, 2001
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move a comment around to where it belongs (the code had alrady been
moved).
parent
74d18ed0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
Lib/warnings.py
Lib/warnings.py
+1
-1
No files found.
Lib/warnings.py
View file @
3756fa3e
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment