On Thu, 13 May 2021 10:15:03 +0100 Irit Katriel via Python-Dev <python-dev@python.org> wrote:
> Following a recent change, we now have in traceback.py: > > _sentinel = object() > def print_exception(exc, /, value=_sentinel, tb=_sentinel, limit=None, > file=None, chain=True): > > So now: > > >>> 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. Regards Antoine. _______________________________________________ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/EJXKQJM7COQFIPPSQGH5O3IAFPUKYWGL/ Code of Conduct: http://python.org/psf/codeofconduct/