https://bugs.kde.org/show_bug.cgi?id=399533
--- Comment #2 from Francis Herne <m...@flherne.uk> --- The current handling is just wrong, and doesn't use __enter__() at all. class Enterable: def __enter__(self): return "value" def __exit__(self, *args): pass with Enterable() as foo: print(foo) # got type 'Enterable' !!! There are other weird cases that we don't handle, e.g. my_list = [1, 2, 3] with Enterable as my_list[1]: # my_list should be `[1, "value", 3]` -- You are receiving this mail because: You are watching all bug changes.