给定一个班级
class SomeClass:
@contextlib.contextmanager
def on_connection(self, target_terminal, source_terminal):
...
yield
...
你如何继承它?
给定一个班级
class SomeClass:
@contextlib.contextmanager
def on_connection(self, target_terminal, source_terminal):
...
yield
...
你如何继承它?