Extra base class in hierarchy

Gregory Ewing greg.ewing at canterbury.ac.nz
Sat Nov 19 16:25:36 EST 2016


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 FinalTreeNode and UsualTreeNode, call them
something like TreeNode and NonFinalTreeNode, with
NonFinalTreeNode inheriting from TreeNode.

-- 
Greg



More information about the Python-list mailing list