MCPcopy Create free account
hub / github.com/dabeaz-course/python-mastery / _init

Method _init

Solutions/6_3/structure.py:10–14  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

8
9 @staticmethod
10 def _init():
11 locs = sys._getframe(1).f_locals
12 self = locs.pop('self')
13 for name, val in locs.items():
14 setattr(self, name, val)
15
16 def __setattr__(self, name, value):
17 if name.startswith('_') or name in self._fields:

Callers 1

__init__Method · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected