I’m not sure about python doc:
A call to format(value, format_spec) is translated to
type(value).__format__(format_spec) which bypasses the
instance dictionary when searching for the value’s
__format__() method.
Is it a typo? I think it should be translated to:
type(value).__format__(value, format_spec)
Yes, you’re correct. The following code…
invokes…