[issue45333] += operator and accessors bug?

2021-09-30 Thread chovey
chovey added the comment: import sys import numpy as np class Kinematics: def __init__(self, *, initial_position: np.ndarray, initial_velocity: np.ndarray): self._position = initial_position # meters self._velocity = initial_velocity # meters per second @property

[issue45333] += operator and accessors bug?

2021-09-30 Thread chovey
chovey added the comment: I confirm I do get this error: Exception has occurred: _UFuncOutputCastingError Cannot cast ufunc 'add' output from dtype('float64') to dtype('int64') with casting rule 'same_kind' I n

[issue45333] += operator and accessors bug?

2021-09-30 Thread chovey
chovey added the comment: Let me get a minimum working example (MWE) developed and then I will return and paste it in here. Ball in my court. Than, you. -- ___ Python tracker <https://bugs.python.org/issue45

[issue45333] += operator and accessors bug?

2021-09-30 Thread chovey
New submission from chovey : We used get/set attribute accessors with private data, and suspect the beaviour we see with the += operator contains a bug. Below is our original implementation, followed by our fix. But, we feel the original implementation should have worked. Please advise