diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2021-06-17 16:41:46 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-17 16:41:46 (GMT) |
commit | eb0a6801bef4f68eebf6fdb2b7a32c32a5b6c983 (patch) | |
tree | d4daad3320ea6760814e16a45ec174fc152b7c31 /Lib/traceback.py | |
parent | 4f71b0199bfd4d83a01bf660a4650307cdc7c089 (diff) | |
download | cpython-eb0a6801bef4f68eebf6fdb2b7a32c32a5b6c983.zip cpython-eb0a6801bef4f68eebf6fdb2b7a32c32a5b6c983.tar.gz cpython-eb0a6801bef4f68eebf6fdb2b7a32c32a5b6c983.tar.bz2 |
bpo-43024: improve signature (in help, etc) for functions taking sent… (GH-24331) (GH-26773)
…inel defaults
(cherry picked from commit f73377d57c5272390de63cccc3c292c44689310a)
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
Diffstat (limited to 'Lib/traceback.py')
-rw-r--r-- | Lib/traceback.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/traceback.py b/Lib/traceback.py index 8f908dd..7a7cca1 100644 --- a/Lib/traceback.py +++ b/Lib/traceback.py @@ -84,8 +84,11 @@ _context_message = ( "another exception occurred:\n\n") -_sentinel = object() +class _Sentinel: + def __repr__(self): + return "<implicit>" +_sentinel = _Sentinel() def _parse_value_tb(exc, value, tb): if (value is _sentinel) != (tb is _sentinel): |