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
f220e994
Commit
f220e994
authored
Jul 01, 2003
by
Tim Peters
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make the classes exposed by threading.py new-style classes. This is
mostly for convenience and to aid debugging.
parent
b39de099
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
3 deletions
+10
-3
Lib/threading.py
Lib/threading.py
+7
-3
Misc/NEWS
Misc/NEWS
+3
-0
No files found.
Lib/threading.py
View file @
f220e994
...
...
@@ -24,13 +24,17 @@ ThreadError = thread.error
del
thread
# Debug support (adapted from ihooks.py)
# Debug support (adapted from ihooks.py).
# All the major classes here derive from _Verbose. We force that to
# be a new-style class so that all the major classes here are new-style.
# This helps debugging (type(instance) is more revealing for instances
# of new-style classes).
_VERBOSE
=
False
if
__debug__
:
class
_Verbose
:
class
_Verbose
(
object
)
:
def
__init__
(
self
,
verbose
=
None
):
if
verbose
is
None
:
...
...
@@ -46,7 +50,7 @@ if __debug__:
else
:
# Disable this when using "python -O"
class
_Verbose
:
class
_Verbose
(
object
)
:
def
__init__
(
self
,
verbose
=
None
):
pass
def
_note
(
self
,
*
args
):
...
...
Misc/NEWS
View file @
f220e994
...
...
@@ -24,6 +24,9 @@ Extension modules
Library
-------
- The classes in threading.py are now new-style classes. That they
weren'
t
before
was
an
oversight
.
-
SF
bug
763023
:
fix
uncaught
ZeroDivisionError
in
difflib
ratio
methods
when
there
are
no
lines
.
...
...
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