MCPcopy Create free account
hub / github.com/bslatkin/effectivepython / __new__

Method __new__

example_code/item_063.py:177–180  ·  view source on GitHub ↗
(meta, name, bases, class_dict)

Source from the content-addressed store, hash-verified

175print("Example 11")
176class Meta(type):
177 def __new__(meta, name, bases, class_dict):
178 cls = type.__new__(meta, name, bases, class_dict)
179 register_class(cls)
180 return cls
181
182class RegisteredSerializable(BetterSerializable, metaclass=Meta):
183 pass

Callers

nothing calls this directly

Calls 1

register_classFunction · 0.85

Tested by

no test coverage detected