Python Forum
Are my descriptions (comments) correct here? [newbie needs help]
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Are my descriptions (comments) correct here? [newbie needs help]
#5
Documentation is great, but you can over do it, in which case many will not try to read it at all.
using a triple quote immediately after the method or function definition line is sufficient, like:
    def get_files(self):
        """
        Get all zip files fron filelist, and extract on the fly
        :return: None
        """
This style will show up nicely when you use help('class_name') as well.
Reply


Messages In This Thread
RE: Are my descriptions (comments) correct here? [newbie needs help] - by Larz60+ - Oct-15-2017, 09:37 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Algorithm for extracting comments from Python source code Pavel1982 6 670 Feb-28-2024, 09:52 PM
Last Post: Pavel1982
  How do I add comments from a text-file to an array of folders? clausneergaard 2 1,845 Feb-08-2023, 07:45 PM
Last Post: Larz60+
  Inserting line feeds and comments into a beautifulsoup string arbiel 1 1,227 Jul-20-2022, 09:05 AM
Last Post: arbiel
  Delete multiple comments with a single API call (facebook) Ascalon 0 2,357 Dec-04-2021, 08:33 PM
Last Post: Ascalon
  Multiline comments macfanpl 6 2,819 May-07-2020, 08:14 PM
Last Post: macfanpl
  Can the comments produce errors in python? newbieAuggie2019 9 4,408 Nov-26-2019, 12:19 AM
Last Post: micseydel
  Variable comments on Visual Studio Code sal 2 3,269 Oct-19-2019, 02:13 PM
Last Post: sal
  Regular expression to fetch comments in C using Python pikkip 4 4,954 Jan-24-2017, 09:21 AM
Last Post: wavic

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020