You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The getter and setter functions of the property __memory in class Model.Vocabulary.Domain.Variables.Memory.Memory (see below) are dysfunctional: They expose the internal property __memory in such a way so that the getters and setter become superfluous. In case of the setter it makes it even inefficient, since it copies the dict instead of referencing it.
If copying was intended behaviour, this should be documented. In this case, a more efficient way of doing this would be to replace the complete function body by either: self.__memory = dict(memory) or self.__memory = memory.copy()
Snippet of the referred functions in Model.Vocabulary.Domain.Variables.Memory.Memory:
@propertydefmemory(self):
"""The content of the memory is stored in this dict(). :type: :class:`dict` """returnself.__memory@memory.setterdefmemory(self, memory):
self.__memory=dict()
fork, vinlist(memory.items()):
self.__memory[k] =v
The text was updated successfully, but these errors were encountered:
The getter and setter functions of the property
__memory
in class Model.Vocabulary.Domain.Variables.Memory.Memory (see below) are dysfunctional: They expose the internal property__memory
in such a way so that the getters and setter become superfluous. In case of the setter it makes it even inefficient, since it copies the dict instead of referencing it.If copying was intended behaviour, this should be documented. In this case, a more efficient way of doing this would be to replace the complete function body by either:
self.__memory = dict(memory)
orself.__memory = memory.copy()
Snippet of the referred functions in Model.Vocabulary.Domain.Variables.Memory.Memory:
The text was updated successfully, but these errors were encountered: