diff options
| author | ignat <[email protected]> | 2022-02-10 16:48:20 +0300 |
|---|---|---|
| committer | Daniil Cherednik <[email protected]> | 2022-02-10 16:48:20 +0300 |
| commit | c8b279dd21ddcb47e755028d81281f113a0f4a11 (patch) | |
| tree | 59384fcb7e8e0566cac1ed9738ab30f0b2559b58 /contrib/tools/python3/src | |
| parent | 2096e85a73bb6b3b20ae25a92943992717fe4167 (diff) | |
Restoring authorship annotation for <[email protected]>. Commit 1 of 2.
Diffstat (limited to 'contrib/tools/python3/src')
| -rw-r--r-- | contrib/tools/python3/src/Lib/ctypes/__init__.py | 4 | ||||
| -rw-r--r-- | contrib/tools/python3/src/Lib/doctest.py | 10 |
2 files changed, 7 insertions, 7 deletions
diff --git a/contrib/tools/python3/src/Lib/ctypes/__init__.py b/contrib/tools/python3/src/Lib/ctypes/__init__.py index 2dde747bebd..6cdc87b81fd 100644 --- a/contrib/tools/python3/src/Lib/ctypes/__init__.py +++ b/contrib/tools/python3/src/Lib/ctypes/__init__.py @@ -371,8 +371,8 @@ class CDLL(object): _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr - self._builtin = {} - + self._builtin = {} + if handle is None: if isinstance(self._name, dict): self._builtin = self._name['symbols'] diff --git a/contrib/tools/python3/src/Lib/doctest.py b/contrib/tools/python3/src/Lib/doctest.py index 2910bebd8d6..8f083e425bd 100644 --- a/contrib/tools/python3/src/Lib/doctest.py +++ b/contrib/tools/python3/src/Lib/doctest.py @@ -956,7 +956,7 @@ class DocTestFinder: elif inspect.isfunction(object): return module.__dict__ is object.__globals__ elif inspect.ismethoddescriptor(object): - if hasattr(object, '__objclass__') and hasattr(object.__objclass__, '__module__'): + if hasattr(object, '__objclass__') and hasattr(object.__objclass__, '__module__'): obj_mod = object.__objclass__.__module__ elif hasattr(object, '__module__'): obj_mod = object.__module__ @@ -964,10 +964,10 @@ class DocTestFinder: return True # [XX] no easy way to tell otherwise return module.__name__ == obj_mod elif inspect.isclass(object): - try: - return module.__name__ == object.__module__ - except: - return True + try: + return module.__name__ == object.__module__ + except: + return True elif hasattr(object, '__module__'): return module.__name__ == object.__module__ elif isinstance(object, property): |
