Raymond Hettinger <[email protected]> added the comment:

I would have expected a bool parse code to insist on a boolean, so that:

    int x;
    PyArg_ParseTupleAndKeywords(args, kwds, "p:func", &x);

would behave the same as:

    PyObject  *o;
    int x;
    PyArg_ParseTupleAndKeywords(args, kwds, "O!:func", &PyBool_Type, &o);
    x = o == Py_True;

----------
nosy: +rhettinger

_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue14705>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to