This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""MethodType for dynamic appending methods to classes""" | |
from types import MethodType | |
class A: | |
def __init__(self) -> None: | |
self.n = 0 | |
def inc(self): |