3 ms·
Mostly I can't remember if a variable escapes from an if-else block, context manager, &etc until I start playing around with the code. In C it's 100% clear, va
by UncleEntity 8y ago
Mostly I can't remember if a variable escapes from an if-else block, context manager, &etc until I start playing around with the code.
In C it's 100% clear, variables only live inside their respective blocks so if you want to mess with the value in an if-else you have to declare it outside of the block.