Last active
April 24, 2024 01:03
-
-
Save Armen-Jean-Andreasian/de701aed15c6cd7a828eef035031d4c5 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
from typing import Callable | |
class B: | |
def b(self): | |
... | |
@property | |
def bb(self) -> Callable: | |
return self.b | |
@bb.setter | |
def bb(self, new: Callable): | |
self.b = new | |
if __name__ == '__main__': | |
b = B() | |
b.bb = print | |
b.b('hello world') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment