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

2015-03-22 Thread Serhiy Storchaka
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

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

2015-03-22 Thread Nick Coghlan
On 22 March 2015 at 04:47, Terry Reedy tjre...@udel.edu wrote: On 3/21/2015 12:41 AM, Serhiy Storchaka wrote: How to document functions with optional positional parameters? For example binascii.crc32(). It has two positional parameters, one is mandatory, and one is optional with default

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

2015-03-21 Thread Victor Stinner
Le samedi 21 mars 2015, Serhiy Storchaka storch...@gmail.com a écrit : For example binascii.crc32(). It has two positional parameters, one is mandatory, and one is optional with default value 0. With Argument Clinic its signature is crc32(data, crc=0, /). The \ is useful, it indicates that