mirror of
https://github.com/python/cpython.git
synced 2025-10-09 08:31:26 +00:00
bpo-43024: improve signature (in help, etc) for functions taking sent… (GH-24331)
…inel defaults
This commit is contained in:
parent
ba2f32a983
commit
f73377d57c
3 changed files with 21 additions and 1 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue