see.features module¶
Python feature definitions.
Reference links:
-
class
see.features.
Feature
(symbol, attrs=None)¶ Bases:
object
Definition of a Python feature that an object might support (such as performing an arithmetic operation or returning a length), and a symbol to indicate this in the output from
see.see()
.>>> add_feature = Feature(symbol='+', attrs=[ ... '__add__', ... '__radd__', ... ])
Support for this feature is detected by checking for one or more special attributes on the object.
-
match
(obj, attrs)¶ Return whether the feature represented by this symbol is supported by a given object and its attributes.
-
-
class
see.features.
HelpFeature
(symbol, attrs=None)¶ Bases:
see.features.Feature
Help feature.
-
match
(obj, attrs)¶ Only match if the object contains a non-empty docstring.
-