summaryrefslogtreecommitdiffstats
path: root/Lib/inspect.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/inspect.py')
-rw-r--r--Lib/inspect.py21
1 files changed, 3 insertions, 18 deletions
diff --git a/Lib/inspect.py b/Lib/inspect.py
index 498ee7a..8a107a8 100644
--- a/Lib/inspect.py
+++ b/Lib/inspect.py
@@ -281,30 +281,15 @@ def get_annotations(obj, *, globals=None, locals=None, eval_str=False):
# ----------------------------------------------------------- type-checking
def ismodule(object):
- """Return true if the object is a module.
-
- Module objects provide these attributes:
- __cached__ pathname to byte compiled file
- __doc__ documentation string
- __file__ filename (missing for built-in modules)"""
+ """Return true if the object is a module."""
return isinstance(object, types.ModuleType)
def isclass(object):
- """Return true if the object is a class.
-
- Class objects provide these attributes:
- __doc__ documentation string
- __module__ name of module in which this class was defined"""
+ """Return true if the object is a class."""
return isinstance(object, type)
def ismethod(object):
- """Return true if the object is an instance method.
-
- Instance method objects provide these attributes:
- __doc__ documentation string
- __name__ name with which this method was defined
- __func__ function object containing implementation of method
- __self__ instance to which this method is bound"""
+ """Return true if the object is an instance method."""
return isinstance(object, types.MethodType)
def ismethoddescriptor(object):