MCPcopy Create free account
hub / github.com/Seogeurim/CS-study / MyInt

Class MyInt

contents/design-pattern/code/SingletonPython/metaclass_ex.py:3–8  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1__author__ = 'Chetan'
2
3class MyInt(type):
4
5 def __call__(cls, *args, **kwds):
6 print("***** Here's My int *****", args)
7 print("Now do whatever you want with these objects...")
8 return type.__call__(cls, *args, **kwds)
9
10class int(metaclass=MyInt):
11

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected