memory-graph 0.3.4__tar.gz → 0.3.5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {memory_graph-0.3.4/memory_graph.egg-info → memory_graph-0.3.5}/PKG-INFO +10 -10
- {memory_graph-0.3.4 → memory_graph-0.3.5}/README.md +9 -9
- {memory_graph-0.3.4 → memory_graph-0.3.5}/memory_graph/__init__.py +1 -1
- {memory_graph-0.3.4 → memory_graph-0.3.5/memory_graph.egg-info}/PKG-INFO +10 -10
- {memory_graph-0.3.4 → memory_graph-0.3.5}/setup.py +1 -1
- {memory_graph-0.3.4 → memory_graph-0.3.5}/LICENSE.txt +0 -0
- {memory_graph-0.3.4 → memory_graph-0.3.5}/MANIFEST.in +0 -0
- {memory_graph-0.3.4 → memory_graph-0.3.5}/memory_graph/config.py +0 -0
- {memory_graph-0.3.4 → memory_graph-0.3.5}/memory_graph/config_default.py +0 -0
- {memory_graph-0.3.4 → memory_graph-0.3.5}/memory_graph/config_helpers.py +0 -0
- {memory_graph-0.3.4 → memory_graph-0.3.5}/memory_graph/extension_numpy.py +0 -0
- {memory_graph-0.3.4 → memory_graph-0.3.5}/memory_graph/extension_pandas.py +0 -0
- {memory_graph-0.3.4 → memory_graph-0.3.5}/memory_graph/html_table.py +0 -0
- {memory_graph-0.3.4 → memory_graph-0.3.5}/memory_graph/list_view.py +0 -0
- {memory_graph-0.3.4 → memory_graph-0.3.5}/memory_graph/memory_to_nodes.py +0 -0
- {memory_graph-0.3.4 → memory_graph-0.3.5}/memory_graph/node_base.py +0 -0
- {memory_graph-0.3.4 → memory_graph-0.3.5}/memory_graph/node_key_value.py +0 -0
- {memory_graph-0.3.4 → memory_graph-0.3.5}/memory_graph/node_linear.py +0 -0
- {memory_graph-0.3.4 → memory_graph-0.3.5}/memory_graph/node_table.py +0 -0
- {memory_graph-0.3.4 → memory_graph-0.3.5}/memory_graph/sequence.py +0 -0
- {memory_graph-0.3.4 → memory_graph-0.3.5}/memory_graph/slicer.py +0 -0
- {memory_graph-0.3.4 → memory_graph-0.3.5}/memory_graph/slices.py +0 -0
- {memory_graph-0.3.4 → memory_graph-0.3.5}/memory_graph/slices_iterator.py +0 -0
- {memory_graph-0.3.4 → memory_graph-0.3.5}/memory_graph/slices_table_iterator.py +0 -0
- {memory_graph-0.3.4 → memory_graph-0.3.5}/memory_graph/t.py +0 -0
- {memory_graph-0.3.4 → memory_graph-0.3.5}/memory_graph/test.py +0 -0
- {memory_graph-0.3.4 → memory_graph-0.3.5}/memory_graph/test_memory_graph.py +0 -0
- {memory_graph-0.3.4 → memory_graph-0.3.5}/memory_graph/test_memory_to_nodes.py +0 -0
- {memory_graph-0.3.4 → memory_graph-0.3.5}/memory_graph/test_sequence.py +0 -0
- {memory_graph-0.3.4 → memory_graph-0.3.5}/memory_graph/test_slicer.py +0 -0
- {memory_graph-0.3.4 → memory_graph-0.3.5}/memory_graph/test_slices.py +0 -0
- {memory_graph-0.3.4 → memory_graph-0.3.5}/memory_graph/test_slices_iterator.py +0 -0
- {memory_graph-0.3.4 → memory_graph-0.3.5}/memory_graph/utils.py +0 -0
- {memory_graph-0.3.4 → memory_graph-0.3.5}/memory_graph.egg-info/SOURCES.txt +0 -0
- {memory_graph-0.3.4 → memory_graph-0.3.5}/memory_graph.egg-info/dependency_links.txt +0 -0
- {memory_graph-0.3.4 → memory_graph-0.3.5}/memory_graph.egg-info/requires.txt +0 -0
- {memory_graph-0.3.4 → memory_graph-0.3.5}/memory_graph.egg-info/top_level.txt +0 -0
- {memory_graph-0.3.4 → memory_graph-0.3.5}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: memory_graph
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.5
|
|
4
4
|
Summary: Draws a graph of your data to analyze its structure.
|
|
5
5
|
Home-page: https://github.com/bterwijn/memory_graph
|
|
6
6
|
Author: Bas Terwijn
|
|
@@ -161,7 +161,7 @@ memory_graph.render(locals(), 'mutable2.png')
|
|
|
161
161
|
| mutable1.png | mutable2.png |
|
|
162
162
|
|
|
163
163
|
|
|
164
|
-
Python makes this distiction between mutable and immutable types because a value of a mutable type
|
|
164
|
+
Python makes this distiction between mutable and immutable types because a value of a mutable type could be large and therefore it would be slow to make a copy each time we change it. On the other hand, a value of a immutable type generally is small and therefore fast to copy.
|
|
165
165
|
|
|
166
166
|
|
|
167
167
|
### Copying ###
|
|
@@ -269,26 +269,26 @@ The function `memory_graph.get_call_stack()` returns the complete call stack, in
|
|
|
269
269
|
import memory_graph
|
|
270
270
|
|
|
271
271
|
def add_one(a, b, c):
|
|
272
|
-
a +=
|
|
273
|
-
b +=
|
|
272
|
+
a += [1]
|
|
273
|
+
b += (1,)
|
|
274
274
|
c += [1]
|
|
275
275
|
memory_graph.show(memory_graph.get_call_stack())
|
|
276
276
|
|
|
277
|
-
a =
|
|
278
|
-
b =
|
|
277
|
+
a = [4, 3, 2]
|
|
278
|
+
b = (4, 3, 2)
|
|
279
279
|
c = [4, 3, 2]
|
|
280
280
|
|
|
281
|
-
add_one(a, b.copy()
|
|
281
|
+
add_one(a, b, c.copy())
|
|
282
282
|
print(f"a:{a} b:{b} c:{c}")
|
|
283
283
|
```
|
|
284
284
|

|
|
285
285
|
|
|
286
|
-
In the printed output only `
|
|
286
|
+
In the printed output only `a` is changed as a result of the function call:
|
|
287
287
|
```
|
|
288
|
-
a:
|
|
288
|
+
a:[4, 3, 2, 1] b:(4, 3, 2) c:[4, 3, 2]
|
|
289
289
|
```
|
|
290
290
|
|
|
291
|
-
This is because `
|
|
291
|
+
This is because `b` is of immutable type 'tuple' so its value gets copied automatically when it is changed. And because the function is called with a copy of `c`, its original value is not changed by the function. The value of variable `a` is the only value of mutable type that is shared between the root stack frame **0: \<module>** and the **1: add_one** stack frame of the function so only that variable is affected as a result of the function call. The other changes remain confined to the local variables of the ```add_one()``` function.
|
|
292
292
|
|
|
293
293
|
|
|
294
294
|
### Recursion ###
|
|
@@ -142,7 +142,7 @@ memory_graph.render(locals(), 'mutable2.png')
|
|
|
142
142
|
| mutable1.png | mutable2.png |
|
|
143
143
|
|
|
144
144
|
|
|
145
|
-
Python makes this distiction between mutable and immutable types because a value of a mutable type
|
|
145
|
+
Python makes this distiction between mutable and immutable types because a value of a mutable type could be large and therefore it would be slow to make a copy each time we change it. On the other hand, a value of a immutable type generally is small and therefore fast to copy.
|
|
146
146
|
|
|
147
147
|
|
|
148
148
|
### Copying ###
|
|
@@ -250,26 +250,26 @@ The function `memory_graph.get_call_stack()` returns the complete call stack, in
|
|
|
250
250
|
import memory_graph
|
|
251
251
|
|
|
252
252
|
def add_one(a, b, c):
|
|
253
|
-
a +=
|
|
254
|
-
b +=
|
|
253
|
+
a += [1]
|
|
254
|
+
b += (1,)
|
|
255
255
|
c += [1]
|
|
256
256
|
memory_graph.show(memory_graph.get_call_stack())
|
|
257
257
|
|
|
258
|
-
a =
|
|
259
|
-
b =
|
|
258
|
+
a = [4, 3, 2]
|
|
259
|
+
b = (4, 3, 2)
|
|
260
260
|
c = [4, 3, 2]
|
|
261
261
|
|
|
262
|
-
add_one(a, b.copy()
|
|
262
|
+
add_one(a, b, c.copy())
|
|
263
263
|
print(f"a:{a} b:{b} c:{c}")
|
|
264
264
|
```
|
|
265
265
|

|
|
266
266
|
|
|
267
|
-
In the printed output only `
|
|
267
|
+
In the printed output only `a` is changed as a result of the function call:
|
|
268
268
|
```
|
|
269
|
-
a:
|
|
269
|
+
a:[4, 3, 2, 1] b:(4, 3, 2) c:[4, 3, 2]
|
|
270
270
|
```
|
|
271
271
|
|
|
272
|
-
This is because `
|
|
272
|
+
This is because `b` is of immutable type 'tuple' so its value gets copied automatically when it is changed. And because the function is called with a copy of `c`, its original value is not changed by the function. The value of variable `a` is the only value of mutable type that is shared between the root stack frame **0: \<module>** and the **1: add_one** stack frame of the function so only that variable is affected as a result of the function call. The other changes remain confined to the local variables of the ```add_one()``` function.
|
|
273
273
|
|
|
274
274
|
|
|
275
275
|
### Recursion ###
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: memory_graph
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.5
|
|
4
4
|
Summary: Draws a graph of your data to analyze its structure.
|
|
5
5
|
Home-page: https://github.com/bterwijn/memory_graph
|
|
6
6
|
Author: Bas Terwijn
|
|
@@ -161,7 +161,7 @@ memory_graph.render(locals(), 'mutable2.png')
|
|
|
161
161
|
| mutable1.png | mutable2.png |
|
|
162
162
|
|
|
163
163
|
|
|
164
|
-
Python makes this distiction between mutable and immutable types because a value of a mutable type
|
|
164
|
+
Python makes this distiction between mutable and immutable types because a value of a mutable type could be large and therefore it would be slow to make a copy each time we change it. On the other hand, a value of a immutable type generally is small and therefore fast to copy.
|
|
165
165
|
|
|
166
166
|
|
|
167
167
|
### Copying ###
|
|
@@ -269,26 +269,26 @@ The function `memory_graph.get_call_stack()` returns the complete call stack, in
|
|
|
269
269
|
import memory_graph
|
|
270
270
|
|
|
271
271
|
def add_one(a, b, c):
|
|
272
|
-
a +=
|
|
273
|
-
b +=
|
|
272
|
+
a += [1]
|
|
273
|
+
b += (1,)
|
|
274
274
|
c += [1]
|
|
275
275
|
memory_graph.show(memory_graph.get_call_stack())
|
|
276
276
|
|
|
277
|
-
a =
|
|
278
|
-
b =
|
|
277
|
+
a = [4, 3, 2]
|
|
278
|
+
b = (4, 3, 2)
|
|
279
279
|
c = [4, 3, 2]
|
|
280
280
|
|
|
281
|
-
add_one(a, b.copy()
|
|
281
|
+
add_one(a, b, c.copy())
|
|
282
282
|
print(f"a:{a} b:{b} c:{c}")
|
|
283
283
|
```
|
|
284
284
|

|
|
285
285
|
|
|
286
|
-
In the printed output only `
|
|
286
|
+
In the printed output only `a` is changed as a result of the function call:
|
|
287
287
|
```
|
|
288
|
-
a:
|
|
288
|
+
a:[4, 3, 2, 1] b:(4, 3, 2) c:[4, 3, 2]
|
|
289
289
|
```
|
|
290
290
|
|
|
291
|
-
This is because `
|
|
291
|
+
This is because `b` is of immutable type 'tuple' so its value gets copied automatically when it is changed. And because the function is called with a copy of `c`, its original value is not changed by the function. The value of variable `a` is the only value of mutable type that is shared between the root stack frame **0: \<module>** and the **1: add_one** stack frame of the function so only that variable is affected as a result of the function call. The other changes remain confined to the local variables of the ```add_one()``` function.
|
|
292
292
|
|
|
293
293
|
|
|
294
294
|
### Recursion ###
|
|
@@ -7,7 +7,7 @@ long_description_from_readme = (this_directory / "README.md").read_text()
|
|
|
7
7
|
|
|
8
8
|
setup(
|
|
9
9
|
name = 'memory_graph',
|
|
10
|
-
version = '0.3.
|
|
10
|
+
version = '0.3.05',
|
|
11
11
|
description = 'Draws a graph of your data to analyze its structure.',
|
|
12
12
|
long_description = long_description_from_readme,
|
|
13
13
|
long_description_content_type = 'text/markdown',
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|