[Python-Dev] inspect() and dir() (original) (raw)
Ethan Furman ethan at stoneleaf.us
Thu Oct 10 00:07:17 CEST 2013
- Previous message: [Python-Dev] inspect() and dir()
- Next message: [Python-Dev] inspect() and dir()
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 10/09/2013 02:46 PM, Nick Coghlan wrote:
On 10 Oct 2013 03:39, "Ethan Furman" wrote:
My apologies. I am actually talking about the module. I meant inspect.getmembers() and inspect.classifyclassattrs(), which, as near as I can tell, are the only two functions in inspect that attempt to retrieve/look at all of an object's attributes. Those have to depend on dir so classes (especially proxies) can accurately report extra dynamically accessible names.
Indeed, my rough idea is to use the results of the new dir() and combining that with the results of the old dir(). The use case being that some classes ahem Enum ahem may report less than is actually available, but introspection should reveal whatever is there even if dir() is not reporting it.
--
Ethan
- Previous message: [Python-Dev] inspect() and dir()
- Next message: [Python-Dev] inspect() and dir()
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]