You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Argument Clinic generates invalid code for optional parameter #64395
Activity
serhiy-storchaka commentedon Jan 8, 2014
Argument Clinic generates invalid code for optional parameter if there are no mandatory parameters except self. Example:
/*[clinic input]
zlib.Decompress.flush
Return a bytes object containing any remaining decompressed data.
[clinic start generated code]*/
Generates:
... switch (PyTuple_Size(args)) { case 0: if (!PyArg_ParseTuple(args, ":flush", )) return NULL; break; ...Note a comma in PyArg_ParseTuple.
larryhastings commentedon Jan 8, 2014
Good catch! It should be an easy fix, but I won't be able to get to it until tomorrow.
larryhastings commentedon Jan 10, 2014
Here's a fix. Works for me, let me know if it works for you.
larryhastings commentedon Jan 12, 2014
Georg, you mind reviewing this too? Six line patch. Just trying to clean my plate a little before I fix a bug for you :D
python-dev commentedon Jan 12, 2014
New changeset 250b481a0d28 by Larry Hastings in branch 'default':
Issue bpo-20196: Fixed a bug where Argument Clinic did not generate correct
http://hg.python.org/cpython/rev/250b481a0d28
larryhastings commentedon Jan 12, 2014
Easy fix. Thanks for the report!