How Do I Perform Introspection on an Object in Python 2.x?

前端 未结 5 1436
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-05 23:42

I\'m using Python 2.x and I have an object I\'m summoning from the aether; the documentation on it is not particularly clear. I would like to be able to get a list of prope

5条回答
  •  半阙折子戏
    2020-12-06 00:11

    You could have a look at the inspect module. It provides a wide variety of tools for inspection of live objects as well as source code.

提交回复
热议问题