google / google/ml_collections
Field types can change after being set to None
Open
- Dominant language
- Python
- Stars
- 1k
- Forks
- 49
- PR merge metrics
- No merged PRs in 30d
Description
I find this behavior surprising with regards to the type safety ConfigDict offers:
```python
c = ConfigDict({'a': 1})
c.a = None
c.a = 'string'
```
I've managed to change the type of `a` from integer to string without any invocation of `ignore_type`. Would it perhaps make sense for the `a` field to "remember" that it was originally an int?
This is on the master branch (cd2928352989701659da17df7b9e649cfc2e6707).
Contributor guide
Assessment
This issue has not been assessed yet.