L
lallous
Hello
I have an a class defined as:
class __object(object):
pass
Now, I call a C function that takes a PyObject* and checks its type:
if (PyString_Check(obj)) ...
if (PySequence_Check(obj)) ....
Before doing the check, I print the passed object with PyObject_Str() and
get:
passed object: <__main__.__object object at 0x040E4050>
However, the C code returns true on the:
if (PySequence_Check(obj)) ....
Why? That is not a sequence?
Please advise.
I have an a class defined as:
class __object(object):
pass
Now, I call a C function that takes a PyObject* and checks its type:
if (PyString_Check(obj)) ...
if (PySequence_Check(obj)) ....
Before doing the check, I print the passed object with PyObject_Str() and
get:
passed object: <__main__.__object object at 0x040E4050>
However, the C code returns true on the:
if (PySequence_Check(obj)) ....
Why? That is not a sequence?
Please advise.