I've been using the Google Docstring format described here but I'm wondering if there is an agreed upon method for documenting lists of a known type.
I've been using
def function(a_list)
"""
Args:
a_list (list[dict]): a list of dictionaries
"""
...
Is this correct?
Given the advances in type hinting that didn't exist when I first asked this question I would now defer to that style:
from typing import List
def function(a_list: List[dict])
"""
Args:
a_list (List[dict]): a list of dictionaries
"""
...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With