Joined July 2012
·
Posted to
Better Way To Initialize Django Forms
over 1 year
ago
That's not exactly DRY, since there is a boolean test twice on request.POST.
Python is about being explicit and easy to read, not about being short and obscure - that sort of stuff is what Perl handles :) Therefore, I would prefer the first code block.
For more, please refer to the Zen of Python - type "import this" in your python shell.
Achievements
82 Karma
0 Total ProTip Views

Forked 100
Have a seriously badass project that's been forked at least 100 times

Walrus
The walrus is no stranger to variety. Use at least 4 different languages throughout all your repos

Forked 50
Have a project with a thriving community of users that's been forked at least 50 times

Lemmings 100
Write something great enough to have at least 100 watchers of the project

Forked 20
Have an established project that's been forked at least 20 times

Python 3
Have at least three original repos where Python is the dominant language

Forked
Have a project valued enough to be forked by someone else

Python
Would you expect anything less? Have at least one original repo where Python is the dominant language
Thanks man! For copy-pasting change-logs, here's an ascii friendly version:
...and the alias: