Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from typing import Callable
- class SomeClass:
- def __init__(self):
- self.s = 'Hello'
- def display(self):
- print(self.s)
- x: Callable[[], SomeClass] = SomeClass
- instance = x()
- instance.display()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement