Forgot to add: I'd probably just use (C API equivalent of) try: ... except TypeError: rather than using inspect. John