New submission from Eric V. Smith <e...@trueblade.com>:
In make_dataclasses(), the "namespace" argument is copied because it is mutated. This isn't really necessary: the callback passed to types.new_class() could just update its "ns" parameter with "namespace" and with the new attributes (__anotations__ and default field values). This would eliminate the need to copy "namespace". ---------- assignee: eric.smith components: Library (Lib) messages: 390907 nosy: eric.smith priority: normal severity: normal status: open title: Remove namespace copy from dataclasses.make_dataclass() type: behavior versions: Python 3.10 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue43820> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com