Théophile Chevalier added the comment:
I cannot do self.position = obj because I have references on position elsewhere.
--
___
Python tracker
<https://bugs.python.org/issue35
Théophile Chevalier added the comment:
I understand your points, I'll give an example with a simplified version of my
problem:
import dataclasses
import othermodule # is an external dependency
@dataclass
class City:
name: str
position: othermodule.Point # Point is a data
New submission from Théophile Chevalier :
Calling dataclasses.replace(instance, **changes) returns a new object of the
same type.
>From my understanding there is, however, no method to update in place fields
>of a dataclass from another one.
I propose to add dataclasses.
Change by Théophile Chevalier :
--
nosy: +theophile
___
Python tracker
<https://bugs.python.org/issue35710>
___
___
Python-bugs-list mailing list
Unsubscribe: