Discussion
Loading...

Post

  • About
  • Code of conduct
  • Privacy
  • About Bonfire
Mark T. Tomczak
@mark@mastodon.fixermark.com  ·  activity timestamp 6 days ago

The Python docstring alignment chart.

#Python

Lawful good: Every function requires a docstring describing inputs and outputs
Neutral good: Public functions require a docstring. Where helpful, inputs and outputs are documented
Chaotic good: Public functions require docstrings.
Lawful Neutral: The linter fails if the docstring does not match the template
True neutral: I document whatever I won't remember
Chaotic neutral: The linter checks for a string at the top of a function
Lawful evil: "The Foo Function"
Neutral evil: "Docstring"
Chaotic evil: 
def Foo: 
  eval(BODY)
Foo.__doc__ = BODY
Lawful good: Every function requires a docstring describing inputs and outputs Neutral good: Public functions require a docstring. Where helpful, inputs and outputs are documented Chaotic good: Public functions require docstrings. Lawful Neutral: The linter fails if the docstring does not match the template True neutral: I document whatever I won't remember Chaotic neutral: The linter checks for a string at the top of a function Lawful evil: "The Foo Function" Neutral evil: "Docstring" Chaotic evil: def Foo: eval(BODY) Foo.__doc__ = BODY
Lawful good: Every function requires a docstring describing inputs and outputs Neutral good: Public functions require a docstring. Where helpful, inputs and outputs are documented Chaotic good: Public functions require docstrings. Lawful Neutral: The linter fails if the docstring does not match the template True neutral: I document whatever I won't remember Chaotic neutral: The linter checks for a string at the top of a function Lawful evil: "The Foo Function" Neutral evil: "Docstring" Chaotic evil: def Foo: eval(BODY) Foo.__doc__ = BODY
  • Copy link
  • Flag this post
  • Block
Log in

Bonfire Dinteg Labs

This is a bonfire demo instance for testing purposes. This is not a production site. There are no backups for now. Data, including profiles may be wiped without notice. No service or other guarantees expressed or implied.

Bonfire Dinteg Labs: About · Code of conduct · Privacy ·
Bonfire social · 1.0.0-rc.3.15 no JS en
Automatic federation enabled
  • Explore
  • About
  • Code of Conduct
Home
Login