These functions raise TypeError when expecting a string parameter and are called with a non-string parameter.
types.TypeType
in the Python
layer. .
PyString_FromStringAndSize(NULL, size)
.
It must not be deallocated.
The function accepts both string and Unicode objects as input. For Unicode objects it returns the default encoded version of the object. If length is set to NULL, the resulting buffer may not contain null characters; if it does, the function returns -1 and a TypeError is raised.
The buffer refers to an internal string buffer of obj, not a
copy. The data must not be modified in any way, unless the string was
just created using PyString_FromStringAndSize(NULL,
size)
. It must not be deallocated.
format % args
. The args argument must be
a tuple.
See About this document... for information on suggesting changes.