Skip to content

Commit

Permalink
Merge pull request #145 from Katze2664/patch-3
Browse files Browse the repository at this point in the history
Update tutorials.6_serializable.rst
  • Loading branch information
boris-il-forte authored Aug 31, 2024
2 parents 5c3170e + 56b9b4b commit c6ce144
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 c6ce144

Please sign in to comment.