The self._reader member variable is only used in two methods of the tree class; __str__() and show(), In fact, the methods are short enough that I will just display the code below:
I am wondering why _reader is a member variable at all, and not simply a local variable. In both functions, _reader is initialized to be the empty string, so its previous contents are wiped out.
The
self._reader
member variable is only used in two methods of the tree class;__str__()
andshow()
, In fact, the methods are short enough that I will just display the code below:I am wondering why
_reader
is a member variable at all, and not simply a local variable. In both functions,_reader
is initialized to be the empty string, so its previous contents are wiped out.