Nguyễn Gia Phong added the comment:
I traced it down to inspect.formatannotation(annotation). Before checking for
isinstance(annotation, type), IMHO we should do something like
import typing
if isinstance(annotation, str):
annotation = typing.ForwardRef(str)._evaluate(annotation
Change by Nguyễn Gia Phong :
--
type: -> enhancement
___
Python tracker
<https://bugs.python.org/issue39990>
___
___
Python-bugs-list mailing list
Unsubscrib
New submission from Nguyễn Gia Phong :
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 i
Change by Nguyễn Gia Phong :
--
versions: +Python 3.9
___
Python tracker
<https://bugs.python.org/issue39125>
___
___
Python-bugs-list mailing list
Unsubscribe:
Nguyễn Gia Phong added the comment:
Relating to this, should there also be indication about the mode (get, set,
del) the property? Currently there is no way to tell if the *attribute* is
read-only, read-write or write-only.
--
versions: -Python 3.9
New submission from Nguyễn Gia Phong :
Dear Maintainer,
I want to request a feature on the generative documentation of type-hinting.
As of December 2019, I believe there is no support for generating such
information in help(). For demonstration, I have this tiny piece of code
class Foo