| 4 | |
| 5 | |
| 6 | class ContextManager: |
| 7 | async def __aenter__(self): |
| 8 | print("Entrada") |
| 9 | ls.append(1) |
| 10 | return 1 |
| 11 | |
| 12 | def __str__(self): |
| 13 | ls.append(2) |
| 14 | return "c'est moi!" |
| 15 | |
| 16 | async def __aexit__(self, exc_type, exc_val, exc_tb): |
| 17 | ls.append(3) |
| 18 | print("Wiedersehen") |
| 19 | |
| 20 | |
| 21 | class AIterWrap: |