Avoiding static members and methods when following python googl-style-guide

70 Views Asked by At

I am writing a hierarchical tree containing management information. There is one tree instance per running program instance. In c++ I will keep root of the tree as a private pointer to a static object. And then have static methods to find/add/delete elements in the tree by name, index, etc.

It is strongly discouraged in google-style-guide for python? It is understandable but how do it in practice?

The only way I can think about it is to pass the root of the tree to every function that needs access to the tree. And it does not seem very appealing.

0

There are 0 best solutions below