Settings

Theme

Bringing Go's defer statement to Python

musings.yasyf.com

1 points by yasyfm 3 years ago · 1 comment

Reader

kamikaz1k 3 years ago

Yes Python's syntax is getting conplex anyway, and yes its fun to explore ideas and have fun...

But you can merge multiple context manage-able resources into a single with expression. So the indentation issue isn't that big of an issue, usually. And now the context manage-y bits are separated from my main function.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection