summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnthony Baxter <anthonybaxter@gmail.com>2005-06-03 14:12:21 (GMT)
committerAnthony Baxter <anthonybaxter@gmail.com>2005-06-03 14:12:21 (GMT)
commit56616999950e151bed766a076e6a6b10f3492f8c (patch)
tree343f0e915e60313380dc8dc93bef065591b38f6b
parente7fa1af85be8ec540dbd17771ce6e29d821e5f20 (diff)
downloadcpython-56616999950e151bed766a076e6a6b10f3492f8c.zip
cpython-56616999950e151bed766a076e6a6b10f3492f8c.tar.gz
cpython-56616999950e151bed766a076e6a6b10f3492f8c.tar.bz2
fix object.__divmod__.__doc__
backport candidate
-rw-r--r--Objects/typeobject.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/Objects/typeobject.c b/Objects/typeobject.c
index 973d72b..d9146d8 100644
--- a/Objects/typeobject.c
+++ b/Objects/typeobject.c
@@ -4908,6 +4908,12 @@ typedef struct wrapperbase slotdef;
#define RBINSLOT(NAME, SLOT, FUNCTION, DOC) \
ETSLOT(NAME, as_number.SLOT, FUNCTION, wrap_binaryfunc_r, \
"x." NAME "(y) <==> y" DOC "x")
+#define BINSLOTNOTINFIX(NAME, SLOT, FUNCTION, DOC) \
+ ETSLOT(NAME, as_number.SLOT, FUNCTION, wrap_binaryfunc_l, \
+ "x." NAME "(y) <==> " DOC)
+#define RBINSLOTNOTINFIX(NAME, SLOT, FUNCTION, DOC) \
+ ETSLOT(NAME, as_number.SLOT, FUNCTION, wrap_binaryfunc_r, \
+ "x." NAME "(y) <==> " DOC)
static slotdef slotdefs[] = {
SQSLOT("__len__", sq_length, slot_sq_length, wrap_inquiry,
@@ -4976,9 +4982,9 @@ static slotdef slotdefs[] = {
"%"),
RBINSLOT("__rmod__", nb_remainder, slot_nb_remainder,
"%"),
- BINSLOT("__divmod__", nb_divmod, slot_nb_divmod,
+ BINSLOTNOTINFIX("__divmod__", nb_divmod, slot_nb_divmod,
"divmod(x, y)"),
- RBINSLOT("__rdivmod__", nb_divmod, slot_nb_divmod,
+ RBINSLOTNOTINFIX("__rdivmod__", nb_divmod, slot_nb_divmod,
"divmod(y, x)"),
NBSLOT("__pow__", nb_power, slot_nb_power, wrap_ternaryfunc,
"x.__pow__(y[, z]) <==> pow(x, y[, z])"),