-
- Downloads
py/runtime: Implement dispatch for "reverse op" special methods.
If, for class X, X.__add__(Y) doesn't exist (or returns NotImplemented), try Y.__radd__(X) instead. This patch could be simpler, but requires undoing operand swap and operation switch to get non-confusing error message in case __radd__ doesn't exist.
Showing
- ports/unix/mpconfigport_coverage.h 1 addition, 0 deletionsports/unix/mpconfigport_coverage.h
- py/mpconfig.h 9 additions, 1 deletionpy/mpconfig.h
- py/objtype.c 7 additions, 0 deletionspy/objtype.c
- py/runtime.c 14 additions, 1 deletionpy/runtime.c
- py/runtime0.h 17 additions, 0 deletionspy/runtime0.h
Loading
Please register or sign in to comment