On Thu, 13 May 2021 10:15:03 +0100 Irit Katriel via Python-Dev firstname.lastname@example.org wrote:
Following a recent change, we now have in traceback.py:
_sentinel = object() def print_exception(exc, /, value=_sentinel, tb=_sentinel, limit=None,
>>> import traceback >>> help(traceback.print_exception) Help on function print_exception in module traceback: print_exception(exc, /, value=<object object at
0x000002825DF09650>, tb=<object object at 0x000002825DF09650>, limit=None, file=None, chain=True)
Is there a convention on how such default sentinel values should appear in docs?
If this were a positional-only argument, you could use square brackets, e.g.:
print_exception(exc[, value[, ...]])
Other than that, I can't think of any existing convention. I agree that <optional> is a reasonable spelling.