Closed sprillo closed 3 years ago
E.g. return self.__cache["leaves"][:] instead of return self.__cache["leaves"]. (The latter returns a pointer to the internal cached list; if the user modifies it the cache breaks.)
return self.__cache["leaves"][:]
return self.__cache["leaves"]
E.g.
return self.__cache["leaves"][:]
instead ofreturn self.__cache["leaves"]
. (The latter returns a pointer to the internal cached list; if the user modifies it the cache breaks.)