Batuhan Taskaya <[email protected]> added the comment:
> Note that dataclasses will break without annotations.
Yes, that is also affecting this simple tester script. There is no alternative
to value-less annotated assignment.
I don't think this is preferable but just for information, these are the
results for keeping AnnAssign nodes but just removing their annotation
def visit_AnnAssign(self, node):
self.stats += 1
node.annotation = ast.copy_location(ast.Constant(value=None),
node.annotation)
return node
Total bytes: 1820086
Total bytes after 629 docstrings (total length of 180333) removed: 1643315
Total bytes after 8859 type annotations removed: 1664649
This way we can still support dataclasses but still gain as close as before
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue40080>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com