Skip to content

code style

python

docstring

In function def, leave a space after first triple-double-quotes, so description is a bit more readable, and it makes a 4 spaces indentation:

def a_function(count: int = 1) -> None:
    """ Here is a description

        :count:   explains count, only if non-trivial
    """

typescript

naming

prefix show for a function (on:click={showButton})
prefix displayfor a variable ({#if displayButton})