
June 21, 2017
10:09 a.m.
Brice PARENT <contact@brice.xyz> writes:
Examples:
with b = a + 1: y = b + 2
I don't think that could work, because the with "arguments" should be expressions, not statements. However, IIRC someone already suggested the alternative with a+1 as b: y = b + 2 but that clashes with the ordinary "context manager" syntax. It's a pity "exec" is now a plain function, instead of a keyword as it was in Py2, as that could allow exec: y = b + 2 with: # or even "in:" b = a + 1 ciao, lele. -- nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia. lele@metapensiero.it | -- Fortunato Depero, 1929.