Lines Matching defs:__format__
1880 def __format__(self, format_spec):
1889 def __format__(self, format_spec):
1920 # TypeError because self.__format__ returns the wrong type
1922 def __format__(self, format_spec):
1930 # tests for object.__format__ really belong elsewhere, but
1932 x = object().__format__('')
1935 # first argument to object.__format__ must be string
1936 self.assertRaises(TypeError, object().__format__, 3)
1937 self.assertRaises(TypeError, object().__format__, object())
1938 self.assertRaises(TypeError, object().__format__, None)
1941 # Issue #7994: object.__format__ with a non-empty format string is
1944 def __format__(self, fmt_str):