Wolfgang Maier schrieb am 26.09.2014 um 09:47: > is there any reliable and inexpensive way to inspect a callable from > running Python code to learn whether it is implemented in Python or C > before calling into it ?
Not really. Both can have very different types and very different interfaces. There are types, classes, functions, methods, objects with a dedicated __call__() method, ... Any of them can be implemented in Python or C (or other native languages, or a mix of more than one language). What's your use case? There might be other ways to achieve what you want. Stefan -- https://mail.python.org/mailman/listinfo/python-list