我这样做意味着什么
print type(foo)
Run Code Online (Sandbox Code Playgroud)
什么都没有?
foo是eBay REST搜索查询的响应,根据eBay文档,它应该是XML.当我
print foo
Run Code Online (Sandbox Code Playgroud)
我得到的东西 - 关于ebay项目的一长串价值观都相互对接.
它意味着type
是一个返回空字符串的函数或其他可调用对象.由于内置函数不这样做,因此很可能调用了另一个函数type()
.将该函数的名称更改为其他名称.type_()
很好.或者_type()
,或somethingtype()
.