[issue20196] Argument Clinic generates invalid code for optional parameter

2014-01-12 Thread Larry Hastings

Larry Hastings added the comment:

Easy fix.  Thanks for the report!

--
resolution:  -> fixed
stage: patch review -> commit review
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20196] Argument Clinic generates invalid code for optional parameter

2014-01-12 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 250b481a0d28 by Larry Hastings in branch 'default':
Issue #20196: Fixed a bug where Argument Clinic did not generate correct
http://hg.python.org/cpython/rev/250b481a0d28

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20196] Argument Clinic generates invalid code for optional parameter

2014-01-12 Thread Larry Hastings

Larry Hastings added the comment:

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

--
nosy: +georg.brandl

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20196] Argument Clinic generates invalid code for optional parameter

2014-01-09 Thread Larry Hastings

Larry Hastings added the comment:

Here's a fix.  Works for me, let me know if it works for you.

--
Added file: 
http://bugs.python.org/file33397/larry.zero.positional.parameters.patch.1.txt

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20196] Argument Clinic generates invalid code for optional parameter

2014-01-09 Thread Larry Hastings

Changes by Larry Hastings :


--
stage: needs patch -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20196] Argument Clinic generates invalid code for optional parameter

2014-01-08 Thread Larry Hastings

Larry Hastings added the comment:

Good catch!  It should be an easy fix, but I won't be able to get to it until 
tomorrow.

--
assignee:  -> larry
stage:  -> needs patch
type:  -> behavior

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20196] Argument Clinic generates invalid code for optional parameter

2014-01-08 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

Argument Clinic generates invalid code for optional parameter if there are no 
mandatory parameters except self. Example:

/*[clinic input]
zlib.Decompress.flush

self: self(type="compobject *")
[
length: uint
the initial size of the output buffer.
]
/

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.

--
components: Build
messages: 207700
nosy: larry, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Argument Clinic generates invalid code for optional parameter
versions: Python 3.4

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com