Python typing Optional and Union: A Practical Guide
Python typing Optional and Union explained: Optional[X] means X or None, Union allows several types, and the modern X | Y syntax. With tested code examples.
We provide tips and resources from industry leaders. For real.
Python typing Optional and Union explained: Optional[X] means X or None, Union allows several types, and the modern X | Y syntax. With tested code examples.
Poetry vs pip compared: pip installs packages, Poetry manages your whole project with pyproject.toml and a lockfile. Learn which to use, with tested examples.
argparse subcommands let you build git-style multi-command CLIs in Python. Learn add_subparsers, per-command arguments, and function dispatch, with tested code.
Best Python web framework compared: Django, Flask, and FastAPI. See which framework fits your project, learning goals, and career, with tested code.
Python global variable explained: variable scope, the global and nonlocal keywords, UnboundLocalError, and best practices, with runnable examples.
Join 12,000+ practitioners. No spam, no filler. Unsubscribe anytime.