44 virtual bool accepts(PyObject *pyob)
const {
45 return pyob !=
nullptr && PyString_Check(pyob) && PySequence_Length(pyob) == 1;
virtual bool accepts(PyObject *pyob) const
Accept only a string of length one.
Definition char.h:44
Char(PyObject *pyob)
Take a borrowed reference to an existing one-character string.
Definition char.h:32
Object(PyObject *pyob=Py_None)
Take a borrowed reference and add a count of its own.
Definition object.h:52
void validate()
Enforce this type's accepts() test on the stored reference.
Definition object.h:237
Configuration header of the PyCXX binding layer.
C++ wrappers for the embedded Python interpreter's objects, types, and extension modules.
Definition attributeerror.h:7