Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Types function returns None or bool

-> bool means the function returns a boolean. Either True or False.

-> None means the function returns None. Explicitely, or implicitely.

def f() -> bool:
    return True

def g() -> None:
    return True


def h() -> None:
    return None

def x() -> None:
    return

def z() -> None:
    pass
function_bool.py:5: error: No return value expected
Found 1 error in 1 file (checked 1 source file)