Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to detect if Python object is class/function/property #1053

Open
ejmeitz opened this issue Sep 1, 2023 · 0 comments
Open

How to detect if Python object is class/function/property #1053

ejmeitz opened this issue Sep 1, 2023 · 0 comments

Comments

@ejmeitz
Copy link

ejmeitz commented Sep 1, 2023

Hello,

I have a couple PyObject's that return the following when printed to screen:
PyObject <property object at 0x000001DA767E5940>
PyObject <function __DataCollection_clone at 0x000001DA75482AC0>
PyObject <class 'ovito.data.DataCollection'>

Is there some property I can access that will tell me if a random PyObject is a class, function or property (besides parsing that string)? I'm trying to use metaprogramming to auto generate class/function signatures while ignoring properties. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant