hanglong10
Re:Understanding a Python Closure Oddity
on Monday June 17, 2024 @07:41AM (#40704588)
Further proof that Python is not fit for functional programming and that Python's namespaces and default lookup by reference are confusing.
In safe languages like ML you would have to create an explicit reference to get that effect, and then it is obvious to the reader.
Python is not built for complex abstractions, but unfortunately it is (ab)used for that, particularly in machine learning.