From: Tim Peters Date: Tue, 1 Jul 2003 20:01:55 +0000 (+0000) Subject: Make the classes exposed by threading.py new-style classes. This is X-Git-Tag: v2.3c1~203 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=59aba128a5266a944d9773f7223f25b164372146;p=python Make the classes exposed by threading.py new-style classes. This is mostly for convenience and to aid debugging. --- diff --git a/Lib/threading.py b/Lib/threading.py index 730da675e5..81a2693349 100644 --- a/Lib/threading.py +++ b/Lib/threading.py @@ -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): diff --git a/Misc/NEWS b/Misc/NEWS index d3761f946b..84da7572df 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -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.