Docs python
“format(value[, format_spec])
Convert a value to a “formatted” representation, as controlled by format_spec. The interpretation of format_spec will depend on the type of the value argument; however, there is a standard formatting syntax that is used by most built-in types: Format Specification Mini-Language.
The default format_spec is an empty string which usually gives the same effect as calling str(value).
A call to format(value, format_spec) is translated to type(value).format(value, format_spec) which bypasses the instance dictionary when searching for the value’s format() method. A TypeError exception is raised if the method search reaches object and the format_spec is non-empty, or if either the format_spec or the return value are not strings.”
Traduction Convertit une valeur vers une représentation formatée, contrôlée par format_spec, la spécifcaton du format.(?) L'interpétation de format_spec va dépendre du type de l'argument valeur; sinon c'est la syntaxe standart de formatage qui est utilisé de base: Format Specification Mini-Language
La spécification par défaut est une chaîne vide laquelle a habituellement le même effet qu'en appelant la fonction str(value). Un appel format(value, format_spec) est traduit par type(value). _format_(value, format_sepc) lequel traverse le dictionnaire de l'instance pour rechercher la méthode de la formatage de la valeur. Une erreur d'exception est remontée si l'objet atteint par la méthode de rechercher et le format_spec n'est pas vide, ou bien si le format_spec ou la valeur retournée n'a pas de chaîne.
Complètement incompréhensible!!