Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2019
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. from typing import Callable
  2.  
  3. class SomeClass:
  4. def __init__(self):
  5. self.s = 'Hello'
  6.  
  7. def display(self):
  8. print(self.s)
  9.  
  10. x: Callable[[], SomeClass] = SomeClass
  11.  
  12. instance = x()
  13. instance.display()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement