Hacker News new | ask | show | jobs
by pejoculant 5073 days ago
Compound with statements are nice, put this is not a 3.1 feature. This was added in 2.7: http://docs.python.org/reference/compound_stmts.html#the-wit...
3 comments

Despite the numbering, 2.7 was released a year after 3.1. It added a bunch of features that helped compatibility with 3.x.
Thanks, I forgot about that.
It was a feature to both. Check the same document for the 3.1 release (and the What's New).
And you could hack this with contextlib.nested before.