Re:Tips to a new django developer
by jksmith on Monday August 31, 2009 @03:40PM
(#796562)
Please, for the love of conciseness, never assign a boolean based on an if statement.
[ Parent
| on HN ]
What if the assignment to the boolean was only one of the things you wanted to execute based on the result of the if statement?
Even then, I'd rather see:
DEBUG = socket.gethostname() == 'developmentcomp'
if DEBUG then...
It's not
How would you rewrite it?