Author conchylicultor
Recipients conchylicultor, larry
Date 2021-04-08.15:47:11
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1617896831.36.0.195884135537.issue43746@roundup.psfhosted.org>
In-reply-to
Content
The above example is a real world example I have currently have. Basically I have some dataclass based configuration like:

in losses.py:
```
class LossesParams:
  ...
```
in dataset.py:
```
class DatasetParams:
  ...
```
in config.py:
```
@dataclasses.dataclass
class Params:
  losses: losses.LossesParams = dataclasses.field()
  dataset: dataset.DatasetParams = dataclasses.field()
```
I want to use params as:
```
param = Params()
param.datasets.batch_size = 123
```
However the above code fail at `dataset: dataset.DatasetParams = dataclasses.field()` due to the closure issue.

The example is simplified but this is a very concrete problem I encountered.
History
Date User Action Args
2021-04-08 15:47:11conchylicultorsetrecipients: + conchylicultor, larry
2021-04-08 15:47:11conchylicultorsetmessageid: <1617896831.36.0.195884135537.issue43746@roundup.psfhosted.org>
2021-04-08 15:47:11conchylicultorlinkissue43746 messages
2021-04-08 15:47:11conchylicultorcreate