Y
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
archangel_one
5073 days ago
Despite the numbering, 2.7 was released a year after 3.1. It added a bunch of features that helped compatibility with 3.x.
link
throwaway54-762
5073 days ago
Thanks, I forgot about that.
link
briancurtin
5073 days ago
It was a feature to both. Check the same document for the 3.1 release (and the What's New).
link
koenigdavidmj
5073 days ago
And you could hack this with contextlib.nested before.
link