Python context managers somewhat require it. You have to create an object on which you can call `__enter__`.
$ gcc -fsanitize=undefined test.c
$ ./a.out
test.c:6:6: runtime error: store to misaligned address 0x55e4007adeb1 for type 'int', which requires 4 byte alignment
0x55e4007adeb1: note: pointer points here
00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 51 00 00 00 00 url_layout.format()
resp.raise_for_status()
resp.json()
session.add()
All those calls are dynamically dispatched - the essence of object oriented programming. This is what allows you to not worry about:
* which string implementation `url_layout` uses
* which HTTP protocol, encryption, authentication, chunking `resp` uses
* what database is connected to `session`