MCPcopy
hub / github.com/cool-RR/PySnooper / __init__

Method __init__

pysnooper/variables.py:21–28  ·  view source on GitHub ↗
(self, source, exclude=())

Source from the content-addressed store, hash-verified

19
20class BaseVariable(pycompat.ABC):
21 def __init__(self, source, exclude=()):
22 self.source = source
23 self.exclude = utils.ensure_tuple(exclude)
24 self.code = compile(source, '<variable>', 'eval')
25 if needs_parentheses(source):
26 self.unambiguous_source = '({})'.format(source)
27 else:
28 self.unambiguous_source = source
29
30 def items(self, frame, normalize=False):
31 try:

Callers

nothing calls this directly

Calls 1

needs_parenthesesFunction · 0.85

Tested by

no test coverage detected