Continuing indentation

Chris Angelico rosuav at gmail.com
Wed Mar 2 21:33:03 EST 2016


On Thu, Mar 3, 2016 at 1:30 PM, Ben Finney <ben+python at benfinney.id.au> wrote:
> If your functions are so long that you fear using a specific name will
> deter you from using it again *in the same scope*, then the name isn't
> descriptive and a better one should be chosen, or the function is too
> large and should be broken into smaller pieces.

It's not just name collisions. You should be able to keep in your head
every local name in a section of code. Giving a name to a single-use
expression wastes one of those precious slots in your mind, even if
it's easily and safely unique.

ChrisA



More information about the Python-list mailing list