Message207430
First, the documentation says that syntax for 'O!' conversion is
object(type='name_of_Python_type'), but actually the type argument should be the name of C structure which represents Python type. I.e. object(type='list') is rejected, and object(type='PyList_Type') is accepted.
Second, from this declaration
/*[clinic]
module spam
spam.ham
items: object(type='PyList_Type')
/
[clinic]*/
Argument Clinic generates following parsing code:
if (!PyArg_ParseTuple(args,
"O!:ham",
PyList_Type, &items))
goto exit;
It is wrong, should be &PyList_Type. |
|
Date |
User |
Action |
Args |
2014-01-06 13:12:14 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, larry, docs@python |
2014-01-06 13:12:14 | serhiy.storchaka | set | messageid: <1389013934.21.0.28397308089.issue20141@psf.upfronthosting.co.za> |
2014-01-06 13:12:14 | serhiy.storchaka | link | issue20141 messages |
2014-01-06 13:12:13 | serhiy.storchaka | create | |
|