如何记录函数返回tuple
的方式,使PyCharm能够使用它进行类型暗示?
捏造的例子:
def fetch_abbrev_customer_info(customer_id):
"""Pulls abbreviated customer data from the database for the Customer
with the specified PK value.
:type customer_id:int The ID of the Customer record to fetch.
:rtype:???
"""
... magic happens here ...
return customer_obj.fullname, customer_obj.status #, etc.
我联系了PyCharm支持,他们是这么说的:
这在PyCharm's documentation中得到了确认:
相关问题 更多 >
编程相关推荐