News for hackers. Stuff that matters.
Re:Pattern matching accepted for Python by codesnik on Thursday February 11, 2021 @06:53PM (#26109174)
I understand this simple rule, and I understand closures, of course, it's just using closure semantics for default arguments doesn't make any sense, aside from some optimization maybe, and pretty dangerous. Other approaches are possible, see ruby, for example, default arguments are evaluated basically as if they're already in the body of running function, every time, only when they're not passed, and with the same lexical scope as the function/method. And what, python retained this behavior even in 3.x? omg.
Re:Pattern matching accepted for Python by carapace on Friday February 12, 2021 @11:10AM (#26115154)
Ah, sorry for over-explaining.