Guest User

Untitled

a guest
Jan 24th, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. class Foo:
  2. def method1(self, arg):
  3. print(self, arg)
  4.  
  5. # something like this variable, but which can be called with instantiated class
  6. func = Foo.method1
  7.  
  8. foo = Foo()
  9. foo.func(1) # I want to call it in a similar way to this
  10.  
  11. func(foo, 1)
Add Comment
Please, Sign In to add comment