
Walrus Operator
The walrus operator (:=
) in Python, introduced in Python 3.8, is also known as the assignment expression. It returns the value as well as assigning it. This can reduce many lines of code and greatly simplifies the language.
The walrus operator (:=
) in Python, introduced in Python 3.8, is also known as the assignment expression. It returns the value as well as assigning it. This can reduce many lines of code and greatly simplifies the language.
I recently started using hatch for python projects, and even though hatch will manage and install dependencies for you (just modify the pyproject.toml file), I noticed the import statements could not find the dependencies. This has to do with how Python and Hatch create virtual environments.
Hatch is a python packaging tool. Useful for building python projects. Out of the box it supports testing, building, managing dependencies, and linting/formatting support.