def _revert_number(self): """ Private method. Called internally when we discard the current structure and want to permit a number which was appended to its name to be reused. WARNING: the current implementation only works for classes which set self.create_name_from_prefix to cause our default _build_struct to set the private attr we use here, self._gensym_data_for_reusing_name, or which set it themselves in the same way (when they call gensym). """ if self._gensym_data_for_reusing_name: prefix, name = self._gensym_data_for_reusing_name # this came from our own call of gensym, or from a caller's if # it decides to set that attr itself when it calls gensym # itself. permit_gensym_to_reuse_name(prefix, name) self._gensym_data_for_reusing_name = None return