Message274702
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. |
|
Date |
User |
Action |
Args |
2016-09-07 02:19:50 | David E. Franco G. | set | recipients:
+ David E. Franco G. |
2016-09-07 02:19:50 | David E. Franco G. | set | messageid: <1473214790.93.0.488939251151.issue27989@psf.upfronthosting.co.za> |
2016-09-07 02:19:50 | David E. Franco G. | link | issue27989 messages |
2016-09-07 02:19:50 | David E. Franco G. | create | |
|