This feature is much less general / useful and much more complicated than julia’s do blocks. On the surface, they appear to do similar things, but they’re actually quite different.
Julia’s do blocks are just syntax sugar for working with higher order functions. This makes them useful in almost any context, unlike python’s with blocks.