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

Method __format__

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

Source from the content-addressed store, hash-verified

1034 return _wrap_strftime(self, fmt, self.timetuple())
1035
1036 def __format__(self, fmt):
1037 if not isinstance(fmt, str):
1038 raise TypeError("must be str, not %s" % type(fmt).__name__)
1039 if len(fmt) != 0:
1040 return self.strftime(fmt)
1041 return str(self)
1042
1043 def isoformat(self):
1044 """Return the date formatted according to ISO.

Callers

nothing calls this directly

Calls 3

strftimeMethod · 0.95
strFunction · 0.85
typeClass · 0.50

Tested by

no test coverage detected