2024-11-09
I've been diving deep into Python lately and I thought of writing a blog post to register some thoughts I had about it.
One thing i really dislike about Python are all the meanings the "else" keyword can assume beyond the obvious one. For a language that takes pride in its simplicity and "only one way to do it" approach it seems really dystonic.
Another thing that doesn't sit right with me is how default argument values are evaluated once per module load rather than once per function call.
Something that left me positively surprised instead were decorators and how they can be used to access arguments and return values. This is a really powerful feature and a breath of fresh air compared to the usual rigid mechanics that can be found in most other programming languages.