Skip to content

Commit

Permalink
Update tutorials.6_serializable.rst
Browse files Browse the repository at this point in the history
Typo in variable name self._list_reference
  • Loading branch information
Katze2664 authored May 24, 2024
1 parent 5c3170e commit 56b9b4b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/source/tutorials/tutorials.6_serializable.rst
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ loaded into the class. It can be useful to set the variables not saved in the fi

In this scenario, we have to set the ``self.not_important`` variable to his default value, but only if it's None, i.e.
has not been loaded from the file, because the file didn't contain it.
Also, we set the `` self._list_primitive`` variable to maintain its original semantic, i.e. to contain a
Also, we set the ``self._list_reference`` variable to maintain its original semantic, i.e. to contain a
reference to the content of the ``self._dictionary`` variable.

To test the implementation, we write a function to write in easy to read way the content of the class:
Expand All @@ -144,4 +144,4 @@ Finally, we test the save functionality with the following code:
We can see that the content of ``self.not_important`` is stored only if the ``full_save`` flag is set to true.

The last remark is that the ``Serializable`` interface works also in presence of inheritance. If you extend a
serializable class, you only need to add the new attributes defined by the child class.
serializable class, you only need to add the new attributes defined by the child class.

0 comments on commit 56b9b4b

Please sign in to comment.