NotImplementedError
PTC-W0053_iter_trees
should raise NotImplementedError
19 self.out_var_name = out_var_name
20
21 @abc.abstractmethod
22 def _iter_trees(self):23 pass
24
25 @classmethod
_leaf_value
should raise NotImplementedError
85 pass
86
87 @abc.abstractmethod
88 def _leaf_value(self): 89 pass
90
91 @staticmethod
_decision_type
should raise NotImplementedError
81 pass
82
83 @abc.abstractmethod
84 def _decision_type(self): 85 pass
86
87 @abc.abstractmethod
_split_value
should raise NotImplementedError
77 pass
78
79 @abc.abstractmethod
80 def _split_value(self): 81 pass
82
83 @abc.abstractmethod
_missing_node
should raise NotImplementedError
73 pass
74
75 @abc.abstractmethod
76 def _missing_node(self): 77 pass
78
79 @abc.abstractmethod
Abstract methods should raise NotImplementeError
when they require derived classes
to override the method, or while the class is being developed to indicate that
the real implementation still needs to be added.
Refer to the docs
to read more about NotImplementedError
.
import abc
class Vehicle:
__metaclass__ = abc.ABCMeta
@abc.abstractmethod
def method_to_implement(self, input):
return
import abc
class Vehicle:
__metaclass__ = abc.ABCMeta
@abc.abstractmethod
def method_to_implement(self, input):
raise NotImplementedError