18
Avoiding boilerplate by using immutable default arguments
(vulwsztyn.codeberg.page)
Welcome to the Python community on the programming.dev Lemmy instance!
Past
November 2023
October 2023
July 2023
August 2023
September 2023
This is the way you're supposed to write it in Python.
It is something you get used to, yet I think it's sad.
You can use mutable default arguments now with a new syntax:
https://peps.python.org/pep-0671/
This is only a Draft for now though