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

Class cls

recipes/Python/576697_Subclass_function/recipe-576697.py:15–19  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13 if not hasattr(bases, '__iter__'):
14 bases = (bases,)
15 class cls(bases[0]):
16 # We can't use the *bases form prior to Python 3. If the later bases do anything clever in
17 # thier metaclasses, we won't recieve their effects. :-(
18 locals().update(suite)
19 # This seems to work reliably in CPython, it's not clear if that's standard
20 cls.__name__ = name
21 cls.__bases__ = bases
22 # Stolen from the NamedTuple implementation

Callers 15

from_paramFunction · 0.50
fromstringMethod · 0.50
post_toMethod · 0.50
fromkeysMethod · 0.50
_my_initFunction · 0.50
cloneMethod · 0.50
expressionMethod · 0.50
combineMethod · 0.50
setup_class_instanceMethod · 0.50
currentMethod · 0.50
newMethod · 0.50
newMethod · 0.50

Calls 1

updateMethod · 0.45

Tested by

no test coverage detected