Skip to content Skip to sidebar Skip to footer

Python Style Guide: Intermittent Variables

I was searching for a Python style guide in terms of 'intermittent variables' and readability. The code that I develope will be mainly used by non-programming-experts, so it should

Solution 1:

The correct words are either intermediate variable or temporary variable. I tend more towards the style in version 1 of your example code, so I use them a lot, but I also tend to prefer more descriptive variable names when I use them. One benefit of version 2 of your code is that this isn't really necessary, since the nested function calls already describe what's happening.

There should be no significant performance difference in creating a few temporary variables. The memory allocation and processing required to execute the two different versions of your code are virtually identical.

Post a Comment for "Python Style Guide: Intermittent Variables"