On Fri, Oct 26, 2012 at 2:23 AM, Chris Angelico <ros...@gmail.com> wrote:
> while (client.spop("profile_ids") as profile_id) is not None:
>     print profile_id
>
> Why is everyone skirting around C-style assignment expressions as
> though they're simultaneously anathema and the goal? :)

Why should these two statements behave differently? :(

    with foo() as bar: bar.baz()
    with (foo() as bar): bar.baz()

I don't understand why everyone is so attached to this "as" syntax.
It's confusing because it behaves subtly differently than how it works
in "with", and it puts the variable on the wrong side of the
assignment operator.

(I've always been partial to ":=", personally.)

-- Devin
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to