]> granicus.if.org Git - python/commit
Issue #19030: final pieces for proper location of various class attributes located...
authorEthan Furman <ethan@stoneleaf.us>
Mon, 21 Oct 2013 05:37:39 +0000 (22:37 -0700)
committerEthan Furman <ethan@stoneleaf.us>
Mon, 21 Oct 2013 05:37:39 +0000 (22:37 -0700)
commitb0c84cdaac987e075099ac65a218505e9efbdda3
treea960c83f11a9a52c4b9036d892c96ce3ed26e392
parentc93dbe2f9b73a00b114e21564b32545898ef356c
Issue #19030: final pieces for proper location of various class attributes located in the metaclass.

Okay, hopefully the very last patch for this issue.  :/

I realized when playing with Enum that the metaclass attributes weren't always displayed properly.

New patch properly locates DynamicClassAttributes, virtual class attributes (returned by __getattr__ and friends), and metaclass class attributes (if they are also in the metaclass __dir__ method).

Also had to change one line in pydoc to get this to work.

Added tests in test_inspect and test_pydoc to cover these situations.
Lib/inspect.py
Lib/pydoc.py
Lib/test/test_inspect.py
Lib/test/test_pydoc.py