You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Maybe my question is not relative to pybind11 but much more about python
I have the following c++ code in which i can write a | 0 = "x";
I tried to wrap the classes A and B using pybind11. I overloaded the __or__ method of B, it works, but overloading __set__ of A doesn't works. Is there any chance to write a|0="x" in python ? I have the following error SyntaxError: cannot assign to operator
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
Maybe my question is not relative to pybind11 but much more about python
I have the following c++ code in which i can write
a | 0 = "x";
I tried to wrap the classes A and B using pybind11. I overloaded the
__or__
method of B, it works, but overloading__set__
of A doesn't works. Is there any chance to writea|0="x"
in python ? I have the following errorSyntaxError: cannot assign to operator
Thanks a lot.
Beta Was this translation helpful? Give feedback.
All reactions