[New-bugs-announce] [issue27989] incomplete signature with help function using typing
David E. Franco G.
report at bugs.python.org
Tue Sep 6 22:19:50 EDT 2016
New submission from David E. Franco G.:
the issue is that when calling help on a function annotated with typing, all the relevant information is lost, for example
from typing import List, Any, Iterator, Tuple
def foo(data:List[Any]) -> Iterator[ Tuple[int,Any] ]:
...
when calling help on that
>>> help(foo)
Help on function foo in module __main__:
foo(data:typing.List) -> typing.Iterator
>>>
all the information is lost, the output should look like this
>>> help(foo)
Help on function foo in module __main__:
foo(data:List[Any]) -> Iterator[ Tuple[int, Any] ]:
>>>
where all the information that I put in the annotation is preserved and the typing.* are eliminated since they only add unnecessary noise
while reporting this issue in the typing module (https://github.com/python/typing/issues/279) I was told that is a bug with the inspect module and that help may need modification.
Thank for your time.
----------
components: Library (Lib)
messages: 274702
nosy: David E. Franco G.
priority: normal
severity: normal
status: open
title: incomplete signature with help function using typing
type: behavior
versions: Python 3.5
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue27989>
_______________________________________
More information about the New-bugs-announce
mailing list