[Python-Dev] How to document functions with optional positional parameters?

Serhiy Storchaka storchaka at gmail.com
Sun Mar 22 09:41:27 CET 2015


On 21.03.15 13:03, Victor Stinner wrote:
> The \ is useful, it indicates that you cannot use keywords.

Wouldn't it confuse users?

> If you want to drop \, modify the function to accept keywords.

Yes, this is a solution. But parsing keyword arguments is slower than 
parsing positional arguments. And I'm working on patches that optimizes 
parsing code generated by Argument Clinic. First my patches will handle 
only positional parameters, with keywords it is harder.



More information about the Python-Dev mailing list