Skip to content

Instantly share code, notes, and snippets.

@eode
Created December 15, 2018 00:04
Show Gist options
  • Save eode/007e09e1f7118e95c0a4f4e8c838256b to your computer and use it in GitHub Desktop.
Save eode/007e09e1f7118e95c0a4f4e8c838256b to your computer and use it in GitHub Desktop.
..this is just a quick rendering of some example text..

Welcome to T4’s documentation!

Module-level docstring

class foo.Fizz(bounce)

Class-level docstring

class Fizz.Fuzz(blarg, honk=9)

Subclass docstring

Fizz.Fuzz.fuzzmethod(fuzzy, wuzzy='was he?')

Subclass method docstring

No one in their right mind would use this method.

Parameters:

  • fuzzy (object) – bear state
  • wuzzy (str) – query

Returns: “false”

Return type: str

Fizz.method(snozz, berries='jam')

Method-level docstring

This method has no legs, but at least the docstring does have a body.

Parameters:

  • snozz (object) – relevant nose
  • berries (str) – expected content name

Returns: 3, the magic number

Return type: int

foo.foo(bar, baz=9)

Function-level docstring

Words, words, words.

Example

fizz, buzz, foo, bar

>>> fizz = 'buzz'
>>> class Snork:
...     pass

A literal example, but without the closing “Example” section: a = 3 b = object()

a markdown literal, explicitly python
a markdown literal, implicitly python
a markdown literal, explicitly javascript

Parameters:

  • bar (object) – bar to foomangle
  • baz (int) – number of times to foomangle

Returns: cat breath soup

Return type: bool

Indices and tables

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment