Satrajit S Ghosh <[email protected]> added the comment:
thank you + serhiy.storchaka
while that works in an interactive namespace, it fails in the following
setting, which is closer to my dynamic use case.
```
class A:
def __init__(self, fields=None):
self.B = dc.make_dataclass('B', fields or [])
self.B.__module__ = __name__
# ...
self.C = self.B()
```
now pickling A() fails.
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue35510>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com