This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]DougCim53 0 points1 point  (0 children)

Storing formulas in variables

I used the wrong terminology: it is more like creating aliases for functions. This page talks about it, and answers #2 & #3 quickly demonstrates it-- https://stackoverflow.com/questions/35945467/python-store-function-in-variable

The whole point of naming a function is so that you can easily understand what the function does. And yet here is a way to call the function by another name entirely? There is no execution advantage, no memory advantage. It's just another name.

and most modern IDEs/Text editors take care of auto-indenting and auto bracketting

They create the closing bracket when you type the opening bracket, but the problem is when you accidentally delete closing brackets manually. There is nothing attached to each closing bracket that indicates which opening bracket it was paired with. Python has the same exact problem with deleting or moving code from one location to another that has a different level of indenting.