In Python, the default is for fields and methods to be public. A field or method can be marked as protected by
starting its name with an underscore, as in _protected_method
. While such fields and methods are not
supposed to be used outside of the containing class, this is merely convention, and Python does not enforce that
restriction. Truly private fields or methods are very rare in idiomatic Python, but can be created by beginning
their name with a double underscore, as in __private_method
.
Rename the reindex
method so that it is private and the reshelve
method so that it is
protected.