We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b4cf877 commit 9f79f17Copy full SHA for 9f79f17
README.rst
@@ -59,6 +59,25 @@ Basics
59
assert store.a_dictionary['new_value'] == "old value"
60
assert store.a_dictionary is not store.a_dictionary
61
62
+ # Appending to, extending a list
63
+ >>> store.list = [1, 2, 3]
64
+
65
+ # Because of the fact that .append won't modify the list in the actual file,
66
+ # but only a copy...
67
+ >>> store.list.append(4)
68
+ >>> store.list
69
+ [1, 2, 3]
70
71
+ # ... we need to rather use the += operator to append to a list.
72
+ >>> store.list += [4]
73
74
+ [1, 2, 3, 4]
75
76
+ # Similarly, we can extend the list
77
+ >>> store.list += [5, 6]
78
79
+ [1, 2, 3, 4, 5, 6]
80
81
Transactions
82
~~~~~~~~~~~~
83
0 commit comments