This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ncoghlan
Recipients barry, brett.cannon, gennad, gvanrossum, jkloth, larry, ncoghlan, serhiy.storchaka, skrah, yselivanov, zach.ware
Date 2014-01-26.13:44:16
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1390743857.06.0.747324159222.issue20326@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2014-01-26 13:44:17ncoghlansetrecipients: + ncoghlan, gvanrossum, barry, brett.cannon, larry, jkloth, skrah, gennad, zach.ware, serhiy.storchaka, yselivanov
2014-01-26 13:44:17ncoghlansetmessageid: <1390743857.06.0.747324159222.issue20326@psf.upfronthosting.co.za>
2014-01-26 13:44:17ncoghlanlinkissue20326 messages
2014-01-26 13:44:16ncoghlancreate