It's messy to have only one or two back-end implementations of a front-end methods which have many optional arguments
Overtime, people have updated some of the functions in treelib to have several different input arguments. Of particular interest are the functions which print and/or save the tree, such as show(). These optional arguments really represent options. It would be best if there were several private (back-end) methods implementing versions of show with specific choices of values for the optional arguments. These private functions should not have long optional argument lists. The front end interface, show can simply input the optional arguments into a look-up table. The look-up table can then return which private method is the correct method to call given the chosen options, and call that private method.
Currently, show calls __print_backend, This is a great start! It's nice to see separate interfaces and implementation. However, as of January 2019, __print_backend is a messy catch-all having too many input arguments.
__print_backend(self, nid=None, level=ROOT, idhidden=True, filter=None,
key=None, reverse=False, line_type='ascii-ex',
data_property=None, func=print):
It would be good there were several simple variants of __print_backend without so many input arguments. The front-end interface simply calls the appropriate variant of __print_backend based on what options were selected.