New submission from Nathaniel Manista <nathan...@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@python
components: Documentation
messages: 325175
nosy: Nathaniel Manista, docs@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 <rep...@bugs.python.org>
<https://bugs.python.org/issue34648>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to