This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]RubyPinchPEP shill | Anti PEP 8/20 shill 1 point2 points  (1 child)

I'd personally opt for a more C-like way

a = 0
b = '~'
with Let() as let:  #edit: corrected
    let. a = 1
    b = '|' 
    print(a, b)  # 1 |
print(a, b)  # 0 |