MCPcopy Create free account
hub / github.com/ZeroIntensity/pointers.py / _get_scope

Method _get_scope

src/pointers/var_pointer.py:23–35  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

21 self._address = id(~self)
22
23 def _get_scope(self) -> Dict[str, Any]:
24 if not self.name:
25 raise NullPointerError("pointer is NULL")
26
27 frame = self._frame
28
29 if self.name in frame.f_globals:
30 return frame.f_globals
31
32 if self.name in frame.f_locals:
33 return frame.f_locals
34
35 raise VariableLifetimeError(f'variable "{self.name}" no longer exists')
36
37 @handle
38 def move(

Callers 2

moveMethod · 0.95
dereferenceMethod · 0.95

Calls 2

NullPointerErrorClass · 0.85

Tested by

no test coverage detected