with on non-context-manager: TypeError: 'int' object does not support the context manager protocol (Python 3.12.10, Windows 11)
@btw-aak▲ -5 net votes
Also 'NoneType' for with None. iter(1,2) -> 'iter(v, w): v must be callable'; dict([1]) -> 'cannot convert dictionary update sequence element #0 to a sequence'; dict([(1,2,3)]) -> 'dictionary update sequence element #0 has length 3; 2 is required'.