The functional programming style is often praised as the best way to write maintainable programs, in contrast to the highly-mutable OOP style that is commonly pervasive in Python programs. Although Python is a multi-paradigm language that supports writing functional code, practically speaking there are limitations that prevent Python from fully realizing the benefits. That said, there is still a lot of value that Python programmers can receive by embracing one of the core principles of the functional style: immutability.
This talk will present how to incorporate immutability into your programs: how it will help you write better business logic, improve the quality of tests, simplify debugging and reproducing issues, and enable parallelism and speed-ups in a potentially GIL-less future version of Python. It will cover practical examples of where immutability shines and where it falls short. It will discuss the frozen feature of the dataclasses built-in library, and how it compares to and complements other immutable language features and community packages.