memory-graph 0.3.72__tar.gz → 0.3.73__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.72 → memory_graph-0.3.73}/PKG-INFO +1 -1
- {memory_graph-0.3.72 → memory_graph-0.3.73}/memory_graph/__init__.py +1 -1
- {memory_graph-0.3.72 → memory_graph-0.3.73}/memory_graph/utils.py +22 -11
- {memory_graph-0.3.72 → memory_graph-0.3.73}/memory_graph.egg-info/PKG-INFO +1 -1
- {memory_graph-0.3.72 → memory_graph-0.3.73}/pyproject.toml +1 -1
- {memory_graph-0.3.72 → memory_graph-0.3.73}/LICENSE.txt +0 -0
- {memory_graph-0.3.72 → memory_graph-0.3.73}/README.md +0 -0
- {memory_graph-0.3.72 → memory_graph-0.3.73}/memory_graph/call_stack.py +0 -0
- {memory_graph-0.3.72 → memory_graph-0.3.73}/memory_graph/config.py +0 -0
- {memory_graph-0.3.72 → memory_graph-0.3.73}/memory_graph/config_default.py +0 -0
- {memory_graph-0.3.72 → memory_graph-0.3.73}/memory_graph/config_helpers.py +0 -0
- {memory_graph-0.3.72 → memory_graph-0.3.73}/memory_graph/extension_numpy.py +0 -0
- {memory_graph-0.3.72 → memory_graph-0.3.73}/memory_graph/extension_pandas.py +0 -0
- {memory_graph-0.3.72 → memory_graph-0.3.73}/memory_graph/extension_torch.py +0 -0
- {memory_graph-0.3.72 → memory_graph-0.3.73}/memory_graph/html_table.py +0 -0
- {memory_graph-0.3.72 → memory_graph-0.3.73}/memory_graph/list_view.py +0 -0
- {memory_graph-0.3.72 → memory_graph-0.3.73}/memory_graph/memory_to_nodes.py +0 -0
- {memory_graph-0.3.72 → memory_graph-0.3.73}/memory_graph/node_base.py +0 -0
- {memory_graph-0.3.72 → memory_graph-0.3.73}/memory_graph/node_key_value.py +0 -0
- {memory_graph-0.3.72 → memory_graph-0.3.73}/memory_graph/node_leaf.py +0 -0
- {memory_graph-0.3.72 → memory_graph-0.3.73}/memory_graph/node_linear.py +0 -0
- {memory_graph-0.3.72 → memory_graph-0.3.73}/memory_graph/node_table.py +0 -0
- {memory_graph-0.3.72 → memory_graph-0.3.73}/memory_graph/sequence.py +0 -0
- {memory_graph-0.3.72 → memory_graph-0.3.73}/memory_graph/slicer.py +0 -0
- {memory_graph-0.3.72 → memory_graph-0.3.73}/memory_graph/slices.py +0 -0
- {memory_graph-0.3.72 → memory_graph-0.3.73}/memory_graph/slices_iterator.py +0 -0
- {memory_graph-0.3.72 → memory_graph-0.3.73}/memory_graph/slices_table_iterator.py +0 -0
- {memory_graph-0.3.72 → memory_graph-0.3.73}/memory_graph/test.py +0 -0
- {memory_graph-0.3.72 → memory_graph-0.3.73}/memory_graph/test_max_graph_depth.py +0 -0
- {memory_graph-0.3.72 → memory_graph-0.3.73}/memory_graph/test_memory_graph.py +0 -0
- {memory_graph-0.3.72 → memory_graph-0.3.73}/memory_graph/test_memory_to_nodes.py +0 -0
- {memory_graph-0.3.72 → memory_graph-0.3.73}/memory_graph/test_sequence.py +0 -0
- {memory_graph-0.3.72 → memory_graph-0.3.73}/memory_graph/test_slicer.py +0 -0
- {memory_graph-0.3.72 → memory_graph-0.3.73}/memory_graph/test_slices.py +0 -0
- {memory_graph-0.3.72 → memory_graph-0.3.73}/memory_graph/test_slices_iterator.py +0 -0
- {memory_graph-0.3.72 → memory_graph-0.3.73}/memory_graph.egg-info/SOURCES.txt +0 -0
- {memory_graph-0.3.72 → memory_graph-0.3.73}/memory_graph.egg-info/dependency_links.txt +0 -0
- {memory_graph-0.3.72 → memory_graph-0.3.73}/memory_graph.egg-info/requires.txt +0 -0
- {memory_graph-0.3.72 → memory_graph-0.3.73}/memory_graph.egg-info/top_level.txt +0 -0
- {memory_graph-0.3.72 → memory_graph-0.3.73}/setup.cfg +0 -0
- {memory_graph-0.3.72 → memory_graph-0.3.73}/setup.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: memory_graph
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.73
|
|
4
4
|
Summary: Teaching tool and debugging aid in context of references, mutable data types, and shallow and deep copy.
|
|
5
5
|
Author-email: Bas Terwijn <bterwijn@gmail.com>
|
|
6
6
|
License-Expression: BSD-2-Clause
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import math
|
|
6
6
|
import types
|
|
7
|
+
import functools
|
|
7
8
|
|
|
8
9
|
def has_dict_attributes(value):
|
|
9
10
|
""" Returns 'True' if 'value' has a '__dict__' attribute. """
|
|
@@ -13,33 +14,43 @@ def get_dict_attributes(value):
|
|
|
13
14
|
""" Returns the items of the '__dict__' attribute of 'value'."""
|
|
14
15
|
return getattr(value,"__dict__")
|
|
15
16
|
|
|
16
|
-
def
|
|
17
|
-
if isinstance(obj, types.FunctionType
|
|
17
|
+
def is_not_state(obj):
|
|
18
|
+
if isinstance(obj, (types.FunctionType, types.MethodType,
|
|
19
|
+
types.BuiltinFunctionType, types.BuiltinMethodType,
|
|
20
|
+
classmethod, staticmethod,
|
|
21
|
+
property, functools.partialmethod)):
|
|
18
22
|
return True
|
|
19
|
-
return type(obj).__name__ in {
|
|
23
|
+
return type(obj).__name__ in {
|
|
24
|
+
'method_descriptor',
|
|
25
|
+
'builtin_function_or_method',
|
|
26
|
+
'getset_descriptor',
|
|
27
|
+
'classmethod_descriptor',
|
|
28
|
+
'wrapper_descriptor',
|
|
29
|
+
'member_descriptor',
|
|
30
|
+
'method-wrapper',
|
|
31
|
+
}
|
|
20
32
|
|
|
21
33
|
def filter_dict(dictionary):
|
|
22
34
|
""" Filters out the unwanted dict attributes. """
|
|
23
|
-
if '__name__' in dictionary:
|
|
24
|
-
return [
|
|
35
|
+
if '__name__' in dictionary:
|
|
36
|
+
return [ # filter classes and modules, no non-state allowed as values
|
|
25
37
|
(k,v) for k, v in dictionary.items() if
|
|
26
38
|
not (type(k) is str and k.startswith('__')) and
|
|
27
39
|
not isinstance(v,types.ModuleType) and
|
|
28
|
-
not
|
|
40
|
+
not is_not_state(v)
|
|
29
41
|
]
|
|
30
|
-
return [
|
|
42
|
+
return [ # filter dictionaries, non-state allowed as values
|
|
31
43
|
(k,v) for k, v in dictionary.items() if
|
|
32
44
|
not (type(k) is str and k.startswith('__'))
|
|
33
45
|
]
|
|
34
46
|
|
|
35
47
|
def filter_type_attributes(tuples):
|
|
36
48
|
""" Filters out the unwanted type attributes (class/static methods). """
|
|
37
|
-
return [
|
|
49
|
+
return [ # filter type objects, no non-state allowed as values
|
|
38
50
|
(k,v) for k, v in tuples if
|
|
39
51
|
not (type(k) is str and k.startswith('__')) and
|
|
40
|
-
not
|
|
41
|
-
|
|
42
|
-
]
|
|
52
|
+
not is_not_state(v)
|
|
53
|
+
]
|
|
43
54
|
|
|
44
55
|
def make_sliceable(data):
|
|
45
56
|
""" Returns a sliceble version of data, convert to list if not yet sliceble. """
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: memory_graph
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.73
|
|
4
4
|
Summary: Teaching tool and debugging aid in context of references, mutable data types, and shallow and deep copy.
|
|
5
5
|
Author-email: Bas Terwijn <bterwijn@gmail.com>
|
|
6
6
|
License-Expression: BSD-2-Clause
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "memory_graph"
|
|
7
|
-
version = "0.3.
|
|
7
|
+
version = "0.3.73"
|
|
8
8
|
description = "Teaching tool and debugging aid in context of references, mutable data types, and shallow and deep copy."
|
|
9
9
|
authors = [
|
|
10
10
|
{name = "Bas Terwijn", email = "bterwijn@gmail.com"}
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|