Message209311
Stefan actually picked up on an existing bug there, that this patch just changes the spelling of:
>>> int.__rdivmod__.__doc__
'__rdivmod__(self, value)\nReturns divmod(value, self).'
>>> int.__rdivmod__.__text_signature__
'(self, value)'
When reviewing Larry's typeobject.c patch, both Guido and I missed the fact that some of the "slot" macros have implicit lines in their docstrings if the signature is common across all instances of that slot:
#define UNSLOT(NAME, SLOT, FUNCTION, WRAPPER, DOC) \
ETSLOT(NAME, as_number.SLOT, FUNCTION, WRAPPER, \
NAME "(self)\n" DOC)
#define IBSLOT(NAME, SLOT, FUNCTION, WRAPPER, DOC) \
ETSLOT(NAME, as_number.SLOT, FUNCTION, WRAPPER, \
NAME "(self, value)\nReturns self" DOC "value.")
#define BINSLOT(NAME, SLOT, FUNCTION, DOC) \
ETSLOT(NAME, as_number.SLOT, FUNCTION, wrap_binaryfunc_l, \
NAME "(self, value)\nReturns self" DOC "value.")
#define RBINSLOT(NAME, SLOT, FUNCTION, DOC) \
ETSLOT(NAME, as_number.SLOT, FUNCTION, wrap_binaryfunc_r, \
NAME "(self, value)\nReturns value" DOC "self.")
#define BINSLOTNOTINFIX(NAME, SLOT, FUNCTION, DOC) \
ETSLOT(NAME, as_number.SLOT, FUNCTION, wrap_binaryfunc_l, \
NAME "(self, value)\n" DOC)
#define RBINSLOTNOTINFIX(NAME, SLOT, FUNCTION, DOC) \
ETSLOT(NAME, as_number.SLOT, FUNCTION, wrap_binaryfunc_r, \
NAME "(self, value)\n" DOC)
For those, we need to change the macro and then remove the redundant info from the individual slot definitions. |
|
Date |
User |
Action |
Args |
2014-01-26 13:44:17 | ncoghlan | set | recipients:
+ ncoghlan, gvanrossum, barry, brett.cannon, larry, jkloth, skrah, gennad, zach.ware, serhiy.storchaka, yselivanov |
2014-01-26 13:44:17 | ncoghlan | set | messageid: <1390743857.06.0.747324159222.issue20326@psf.upfronthosting.co.za> |
2014-01-26 13:44:17 | ncoghlan | link | issue20326 messages |
2014-01-26 13:44:16 | ncoghlan | create | |
|