Seite 1 von 1

in C Python typ herausfinden

Verfasst: Donnerstag 22. Mai 2008, 21:43
von thomas15
Hallo,

ganz einfache Frage aber ich finds selbst nicht:

wie kann ich in C den Typ eines PyObjects bestimmen?

ala
pythonTypKonstante == getType(object)

PyInt == getType(object)
PyFloat == getType(object)
...

das man bestimmen kann ob das Objekt einen int kapselt, oder double, char*, was auch immer. Für numpy gibts solche Konstanten...

So wie man es in C halt machen würde...

Danke,
Thomas