In Python, with statements can be nested. A usual use case is the connection to a database and opening a cursor:

with pyodbc.connect(...) as connection:
    with connection.cursor() as crs:
        pass # do something

Today I learned that with statements can have more than one such statement. The following is possible:

with A() as a, B() as b:
    # this works!
    print(a, b)

This also works with nested attributes. Back to the database example:

with pyodbc.connect(...) as connection, \
     connection.cursor() as crs:
    # crs is defined correctly and usable here!
    pass

One can discuss about beauty of the intendation here, but it this works out.