[Python-Dev] Strange "help(int.__lt__)". Probably documentation bug

Nick Coghlan ncoghlan at gmail.com
Thu Nov 27 15:11:39 CET 2014


On 27 November 2014 at 23:43, Jesus Cea <jcea at jcea.es> wrote:
> On 27/11/14 13:42, Victor Stinner wrote:
>> 2014-11-27 13:41 GMT+01:00 Victor Stinner <victor.stinner at gmail.com>:
>>> I am amused about the "/)" suffix in the signature. It happens to all
>>> magic methods.
>>
>> If I remember correctly, it means  that the function does not accept keywords:
>
> I don't understand. Is that internal annotation for the clinic machinery?.

See PEP 457 for the broader context: https://www.python.org/dev/peps/pep-0457/

The migration of pydoc (and other introspection APIs) to
inspect.signature in Python 3.4 entailed having an unambiguous string
representation of positional only parameters - that's the trailing '/'
(which mirrors the corresponding syntax in the Argument Clinic DSL).

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia


More information about the Python-Dev mailing list