writing extension -- custom type validation
Eric Hagemann
ehagemann at home.com
Sun May 27 22:05:39 EDT 2001
I am making a new data type in an extension module.
Is there as way to detect / check for a custom type (of the type I am
creating) from a PyObject ?
As an example I can see if an object is a PyInt by using
PyInt_Check(PyObject *obj)
The crux of my question comes to the initialization function. I want to
"overload" the input type. It is valid to initialize from a string,
sequence of ints or another custom type object -- what I am looking for is a
positive confirmation of the custom type.
My eyes are going googly from the docs -- did I miss something obvious ?
Cheers
Eric Hagemann
More information about the Python-list
mailing list