Using the dict as a default value for a function parameter still feels hacky to me. I could have used another global variable instead, but coders usually think of globals as even worse. I wish I could just use a static var, as in C-flavor languages. I guess the "right way" to do that in python is probably to build a class with a member variable, but that would have been way too much coding for a math-focused video.
This would be a nice tutorial for me if I wanted to learn Python or could learn Python. Right now, I cannot as I am learning JAVA.
Jazzinator1234567890 1 year ago
awesome
constantinos679 1 year ago
of course there is a better way of doing this than using a recursive function (eek!)... but using a dict to memorize the values was tight.
filipemtx 2 years ago
thanks
Using the dict as a default value for a function parameter still feels hacky to me. I could have used another global variable instead, but coders usually think of globals as even worse. I wish I could just use a static var, as in C-flavor languages. I guess the "right way" to do that in python is probably to build a class with a member variable, but that would have been way too much coding for a math-focused video.
tylerneylon 2 years ago
Very informing!
tadej63 2 years ago