def format(*args, **kwargs): # known special case of str.format
"""
S.format(*args, **kwargs) -> string
Return a formatted version of S, using substitutions from args and kwargs.
The substitutions are identified by braces ('{' and '}').
"""
pass
"".my_format()
>>> (1).__format__
<built-in method __format__ of int object at 0x4cba34a0>
>>>
>>> class Int(int):
... def __format__(self, spec):
... if spec.startswith('x'):
... return str(self) * int(spec[1:])
... return super().__format__(spec)
...
>>> n = Int(10)
>>> '{:05d} {:x5}'.format(n, n)
'00010 1010101010'
>>>