[issue40794] dataclass signatures and docstrings w/future-annotations

Batuhan Taskaya report at bugs.python.org
Wed May 27 09:45:29 EDT 2020


Batuhan Taskaya <isidentical at gmail.com> added the comment:

> It,sounds like you are trying to get the effect of putting 'from __future__ import dataclasses' at the top of dataclasses'.py, right?

Yes, since compile will automatically inherit the flags of the current frame to the compiled code I'm basically inserting a 'future annotations' import at the top of the file. 

> Are you saying that without this, the output of the test script is correct?

Yes.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40794>
_______________________________________


More information about the Python-bugs-list mailing list