Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 157671
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T10:32:44+00:00 2026-05-11T10:32:44+00:00

What, in Your opinion is a meaningful docstring? What do You expect to be

  • 0

What, in Your opinion is a meaningful docstring? What do You expect to be described there?

For example, consider this Python class’s __init__:

def __init__(self, name, value, displayName=None, matchingRule='strict'):     '''     name - field name     value - field value     displayName - nice display name, if empty will be set to field name     matchingRule - I have no idea what this does, set to strict by default     ''' 

Do you find this meaningful? Post Your good/bad examples for all to know (and a general answer so it can be accepted).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T10:32:45+00:00Added an answer on May 11, 2026 at 10:32 am

    I agree with "Anything that you can’t tell from the method’s signature". It might also mean to explain what a method/function returns.

    You might also want to use Sphinx (and reStructuredText syntax) for documentation purposes inside your docstrings. That way you can include this in your documentation easily. For an example check out e.g. repoze.bfg which uses this extensively (example file, documentation example).

    Another thing one can put in docstrings is also doctests. This might make sense esp. for module or class docstrings as you can also show that way how to use it and have this testable at the same time.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to get your opinion on this. I have a class which is
I'd like to ask your opinion on this. This is a theoretical question. I'm
This is more of a request for your opinion in something, rather than a
Just wondering your opinion on how I should model my documents for this scenario.
I need your opinion about this code below. I have a list of messages:
Can you tell me your opinion of this, and possibly see if you can
Can you tell me your opinion of this, and possibly see if you can
Hello and thanks for your opinion. I am creating a webservice. This webservice will
Should each class in my C# project get its own file (in your opinion)?
I'd like to have your opinion on a specific case, please. This is about

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.