Message207430
| Author | serhiy.storchaka |
|---|---|
| Recipients | docs@python, larry, serhiy.storchaka |
| Date | 2014-01-06.13:12:13 |
| SpamBayes Score | -1.0 |
| Marked as misclassified | Yes |
| Message-id | <1389013934.21.0.28397308089.issue20141@psf.upfronthosting.co.za> |
| In-reply-to |
| Content | |
|---|---|
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. |
|
| History | |||
|---|---|---|---|
| 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 | |