In article <mailman.4811.1388704420.18130.python-l...@python.org>, John Allsup <py...@allsup.co> wrote:
> if testFunc() as x: > do something with x +1 The most common place I wish for an atomic "test and assign" is with regexes, as in your examples. This would be so much nicer than what we have to do now: if re.match(string) as m: print m.group(0) The analogy to except SomeError as ex: is very clear. They are both "Perform some action, capture the result, do some test on it, and then make that captured value available bound to a name". -- https://mail.python.org/mailman/listinfo/python-list