Dokumentieren des Rückgabetyps "Tupel" in einem Funktionsdokumentstring für Hinweise auf PyCharm-Typen

Wie kann ich dokumentieren, dass eine Funktion a zurückgibt?tuple in der Weise, dass PyCharm es für Typhinweise verwenden kann?

Erfundenes Beispiel:

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.

Antworten auf die Frage(1)

Ihre Antwort auf die Frage