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

Method _init

Solutions/6_2/structure.py:9–13  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers 1

__init__Method · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected