All languages

Python for DevOps

You're viewing a free preview. Sign in free to read every script.

Why this exists A script that grows past fifty lines needs functions, and functions that other people (or you in six months) call need clear signatures. Python's argument rules are flexible, which is a strength and the…

Python for DevOps: Functions, Arguments, Closures, Type Hints and Checking Them with mypy

Write functions other people can use: keyword-only and default parameters, *args and **kwargs, the mutable-default trap, functions as values, scope and closures, caching, docstrings, and type hints that mypy actually checks (with the errors it finds that Python itself would let through).

Sign in free to read this script, along with the rest of the library.

Sign in free