Are these two statements equivalent?
with A() as a, B() as b:
# do something
with A() as a:
with B() as b:
# do something
I ask because both a
and b
alter global variables (tensorflow here) and b
depends on changes made by a
. So I know the 2nd form is safe to use, but is it equivalent to shorten it to the 1st form?