MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / __format__

Method __format__

tools/python-3.11.9-amd64/Lib/datetime.py:1561–1566  ·  view source on GitHub ↗
(self, fmt)

Source from the content-addressed store, hash-verified

1559 return _wrap_strftime(self, fmt, timetuple)
1560
1561 def __format__(self, fmt):
1562 if not isinstance(fmt, str):
1563 raise TypeError("must be str, not %s" % type(fmt).__name__)
1564 if len(fmt) != 0:
1565 return self.strftime(fmt)
1566 return str(self)
1567
1568 # Timezone functions
1569

Callers

nothing calls this directly

Calls 3

strftimeMethod · 0.95
strFunction · 0.85
typeClass · 0.50

Tested by

no test coverage detected