Ian Kelly wrote:
Is it better to introduce an extra base class?
That's one possibility. An advantage would be that it
would be easier to add methods in the future that apply
to UsualTreeNodes but not FinalTreeNodes.
Another possibility would be to just rename the classes.
Instead of FinalTreeN
On Nov 19, 2016 11:22 AM, "Victor Porton" wrote:
Consider
class FinalTreeNode(object):
def childs(self):
return []
class UsualTreeNode(FinalTreeNode)
def childs(self):
return ...
In this structure UsualTreeNode derives from FinalTreeNode.
This looks odd because "final
Consider
class FinalTreeNode(object):
def childs(self):
return []
class UsualTreeNode(FinalTreeNode)
def childs(self):
return ...
In this structure UsualTreeNode derives from FinalTreeNode.
Is it better to introduce an extra base class?
class BaseTreeNode(object):
d