News for hackers. Stuff that matters.
Re:True hacker resume: CV as Python unit test by masklinn on Thursday July 15, 2010 @06:01PM (#1519394)
> Not in this case, but Yoda conditions can be useful.

Not in Python. Assignments as anything but stand-alone (potentially chained) statements are syntax errors.

The parser will not let you write

    if something = 2:
in the first place.
Re:True hacker resume: CV as Python unit test by acangiano on Thursday July 15, 2010 @06:13PM (#1519435)
That's why I said "not in this case". There are languages affected by this though (typically C-based ones). Ideally, their compiler will give you a warning about it, but that's not always the case.