与python文档中的格式()混淆
我不确定python文档: 是打字错误吗?我认为应该翻译成:与python文档中的格式()混淆,python,Python,我不确定python文档: 是打字错误吗?我认为应该翻译成: type(value).__format__(value, format_spec) 是的,你说得对。下面的代码 format(foo, "bar") 调用 type(foo).format(foo, "bar") 是的,你说得对。下面的代码 format(foo, "bar") 调用 type(foo).format(foo, "bar") 对,;承包商的文件具有以下签名: object.__format__(self,
type(value).__format__(value, format_spec)
是的,你说得对。下面的代码
format(foo, "bar")
调用
type(foo).format(foo, "bar")
是的,你说得对。下面的代码
format(foo, "bar")
调用
type(foo).format(foo, "bar")
对,;承包商的文件具有以下签名:
object.__format__(self, format_spec)
对,;承包商的文件具有以下签名:
object.__format__(self, format_spec)