I want to find a generic way to list a python object attributes (names and values) but in a concise way.
This works pretty well when using vars(), but you can't use it if there's no __dict__; and dir() is full of uninteresting attributes.
I know that's kind of random, but PyCharm is doing something similar somehow, here's an example for the numpy ndarray object, which has no __dict__; and dir() contains 161 attributes. I tried to remove private and callable values from dir(), but still, there are dozens.
Any idea for how PyCharm is doing it? Is there a chance they have a special treatment for numpy objects for example?
