3 ms·
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-with-statement
by pejoculant 14y 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-with-statement http://docs.python.org/reference/compound_stmts.html#the-wit...
- koenigdavidmj 14y agoAnd you could hack this with contextlib.nested before.
- archangel_one 14y agoDespite the numbering, 2.7 was released a year after 3.1. It added a bunch of features that helped compatibility with 3.x.
- throwaway54-762 14y agoThanks, I forgot about that.
- briancurtin 14y agoIt was a feature to both. Check the same document for the 3.1 release (and the What's New).