MCPcopy Create free account
hub / github.com/ActiveState/code / slots

Function slots

recipes/Python/578151_affinitypy/recipe-578151.py:19–22  ·  view source on GitHub ↗

Sets the __slots__ variable in the calling context with private names.

(names='')

Source from the content-addressed store, hash-verified

17################################################################################
18
19def slots(names=''):
20 "Sets the __slots__ variable in the calling context with private names."
21 sys._getframe(1).f_locals['__slots__'] = \
22 tuple('__' + name for name in names.replace(',', ' ').split())
23
24################################################################################
25

Callers 3

TreeviewNodeClass · 0.90
AffinityClass · 0.70
_DelegateClass · 0.70

Calls 2

splitMethod · 0.45
replaceMethod · 0.45

Tested by

no test coverage detected