Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

:return: keyword inside comment

I was writing a comment inside the function and my IDE autocompleted it like this:

async def some_func():
    """

    :return:
    """

What is this :return: used for and where can I read more about this?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

this is part of the sphinx docstring format (there are many other format types like numpy, google, etc). this link should help describe in detail.

these docstring specification help with auto documentation like you see with many python packages (eg link see "Returns" section)

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading