diff options
| author | J08nY | 2020-07-01 12:45:11 +0200 |
|---|---|---|
| committer | J08nY | 2020-07-01 23:09:28 +0200 |
| commit | caf976a6b0ccb0e3feb3edd4688eabcaa21dd44c (patch) | |
| tree | dbb8dcc525426538ebb7659d9182fc7fb6570b91 /pyecsca/ec/context.py | |
| parent | 382e6a5a134c98d2699d6cc0e7a1ea63fbf7f5a9 (diff) | |
| download | pyecsca-caf976a6b0ccb0e3feb3edd4688eabcaa21dd44c.tar.gz pyecsca-caf976a6b0ccb0e3feb3edd4688eabcaa21dd44c.tar.zst pyecsca-caf976a6b0ccb0e3feb3edd4688eabcaa21dd44c.zip | |
Diffstat (limited to 'pyecsca/ec/context.py')
| -rw-r--r-- | pyecsca/ec/context.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/pyecsca/ec/context.py b/pyecsca/ec/context.py index 144ca92..02c8a6d 100644 --- a/pyecsca/ec/context.py +++ b/pyecsca/ec/context.py @@ -195,13 +195,20 @@ class PathContext(Context): self.current.pop() self.current_depth -= 1 - def __init__(self, path: Sequence[int]): + """ + Create a :py:class:`PathContext`. + + :param path: The path of an action in the execution tree that will be captured. + """ self.path = list(path) self.current = [] self.current_depth = 0 self.value = None + def __repr__(self): + return f"{self.__class__.__name__}({self.current!r}, depth={self.current_depth!r})" + _actual_context: ContextVar[Context] = ContextVar("operational_context", default=NullContext()) |
