Skip to content
Snippets Groups Projects

Documentation example

""" Cool module containing functions, classes and other useful things """
from typing import Union
from collections import OrderedDict
def greeter():
"""Prints a nice message"""
print("Hello World!, test line over 80 but not 88 characters on a single line")
class DocumentationExample:
"""Class to demonstrate docstring documentation"""
def __init__(self):
self.attribute: str = "Hello World"
def operate(self, data: Union[str, int]) -> int:
"""Perform operation
:py:attr:`.self.attribute`
:py:func:`~.greeter`
:py:class:`collections.OrderedDict`
``OrderedDict(data)``
:param data: The data to peform the operation on
:raises RuntimeError: Raised if not enough memory to create Dict
:return: integer value representing success or failure
"""
test = OrderedDict()
return 0
Loading