]> granicus.if.org Git - python/commitdiff
#759525: document that dir() doesn't return metaclass attrs when given a class as...
authorGeorg Brandl <georg@python.org>
Sun, 6 Jan 2008 15:48:20 +0000 (15:48 +0000)
committerGeorg Brandl <georg@python.org>
Sun, 6 Jan 2008 15:48:20 +0000 (15:48 +0000)
Doc/library/functions.rst
Doc/library/inspect.rst

index 6720f1982886ec48970e9eac340d1bc72bac9ee4..4f86fc71c6fb27f7b3b3a929e0191b74070fd3e3 100644 (file)
@@ -302,7 +302,8 @@ available.  They are listed here in alphabetical order.
       Because :func:`dir` is supplied primarily as a convenience for use at an
       interactive prompt, it tries to supply an interesting set of names more than it
       tries to supply a rigorously or consistently defined set of names, and its
-      detailed behavior may change across releases.
+      detailed behavior may change across releases.  For example, metaclass attributes
+      are not in the result list when the argument is a class.
 
 
 .. function:: divmod(a, b)
index fbc9d04bf368da4e9d9fb08ba7d5b89b5797f251..c1f0f009399e9994117e01953bf12f062094aeb1 100644 (file)
@@ -195,6 +195,11 @@ Note:
    name.  If the optional *predicate* argument is supplied, only members for which
    the predicate returns a true value are included.
 
+   .. note::
+
+      :func:`getmembers` does not return metaclass attributes when the argument
+      is a class (this behavior is inherited from the :func:`dir` function).
+
 
 .. function:: getmoduleinfo(path)