hanzspam at yahoo.com.au
Thu Jan 13 17:20:39 CET 2005
Antoon Pardon wrote:
> So if I have a call with an expression that takes more than
> one line, I should assign the expression to a variable and
> use the variable in the call?
Yes, that's sometimes a good practice and can clarify
> But wait if I do that, people will tell me how bad that it
> is, because it will keep a reference to the value which
> will prevent the garbage collector from harvesting this
Nobody will tell you that it's bad. Python was never
about super performance, but about readability.
Besides, using such temporaries won't consume much
> Besides python allows more than one statement on the same line.
But it's discouraged in general.
More information about the Python-list