Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок0
Why aren't my user defined class attributes and methods available using the 'with' context manager keyword?
Context Manager and User Classes
1 ответ
0
you need to implement __enter__ and __exit__ methods in order to have a context manager