Skip to content

Output examples

Axel Gard edited this page Sep 30, 2021 · 1 revision

The original source code

tests/.ex/

tests/.ex/car.py

class Car()

The Car class

class Engine()

The Engine subclass

def __init__(self)
None

def __init__(self)
None

def start(self, time: str, car_key)
starts the engine of the car

def stop(self, a=1, b=2, c=None, *args, **kwargs)
Stop the engine of the car!

def honk(self)
Use
"the"
""horn""

def nested_test()
nested function inside honk

def __str__(self)
Example of a longer multiline-docstring,
everything will still be formatted correctly

@staticmethod
@staticmethod
def funcname(param1: str, param2: int)

The docstring to the static method

async def async_def_test(a, b, c)
Testing coroutines declared with async syntax

def no_class_def_test()
None

tests/.ex/add.py

def add(a, b)
add to objects

tests/.ex/recursive_ex/point.py

class Point()

Creates a point on a coordinate plane with values x and y.

def __init__(self, x_init, y_init)
Defines x and y variables

def shift(self, x, y)
Determines where x and y move

def __repr__(self)
None