New submission from Nguyễn Gia Phong <vn.mcsi...@gmail.com>:

With PEP 563, it is legal to annotate a function as follows

def foo(bar: 'int') -> 'bool': pass

Currently, help(foo) would print the exact signature in foo.__annotations__ and 
it's not really pretty.  My proposal is to use the type hints from 
typing.get_type_hints to make documentations more readable from the user's 
perspective.  I might not be aware of all use cases and disadvantages of this 
proposal however.

----------
assignee: docs@python
components: Documentation
messages: 364399
nosy: McSinyx, docs@python
priority: normal
severity: normal
status: open
title: help output should make use of typing.get_type_hints

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue39990>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to