- Introduced new `__enter()__` and `__exit()__` methods for the `pt.Container` class, allowing it to be entered as a context. Doing so will include every `k: v` pair in the Container as a `variable = value` in the context's namespace.
python
var1 = 10
CT = pt.Container(var1=20, var2=40)
with CT:
var1 *= 2 CT[var1] = 40
print(var1, var2) 40 40
exiting the context restores the previous namespace, including non-keys!
print(var1) 10
print(CT) {'var1': 40, 'var2': 40} ks: vs were modified after exiting the context