[New-bugs-announce] [issue34648] Confirm the type of traceback.format_list post-3.5

Nathaniel Manista report at bugs.python.org
Wed Sep 12 16:03:24 EDT 2018


New submission from Nathaniel Manista <nathaniel at google.com>:

So I'm fixing a bug in typeshed's accounting of the traceback module (https://github.com/python/typeshed/pull/2436) and the documented semantics of traceback.format_list don't quite smell to me what I think they might be intended to be:

1) I know it has the name "format_list", but is it really intended to require a list? Why not a sequence, or a collection, or an iterable? I would think it would be fine to pass an iterable to traceback.format_list. Is it fine?

2) What is the desired component type for the aggregate passed to format_list? In 3.4-and-earlier it was Tuple[str, int, str, Optional[str]], and that still works in 3.5-through-3.8, but is that just backwards compatibility or is that something that users of traceback.format_list should feel encouraged to continue passing into the future?

Sorry for filing a bug just to ask "huh; really?" but... please confirm?

----------
assignee: docs at python
components: Documentation
messages: 325175
nosy: Nathaniel Manista, docs at python
priority: normal
severity: normal
status: open
title: Confirm the type of traceback.format_list post-3.5
type: behavior
versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34648>
_______________________________________


More information about the New-bugs-announce mailing list