Added subclass descriptions

This commit is contained in:
Ben Cook
2018-12-21 12:25:02 -05:00
parent 35b272be5f
commit 0dbe54605f
40 changed files with 1069 additions and 186 deletions
+14
View File
@@ -83,3 +83,17 @@ class Feature():
return -100
class FeatureSelector(Feature):
"""
A feature with multiple possible choices.
"""
options = dict()
def __init__(self, selection=None):
keep_source = self.source
# Transform into selected feature
if selection.lower() in self.options():
new_feat = self.options[selection.lower()]
self.__dict__.update(new_feat.__dict__)
new_feat.__init__(self)
self.source = keep_source