Advertisement
MatthewRock

Python_self

Apr 9th, 2017
334
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.19 KB | None | 0 0
  1. class NoExplicit:
  2.   def __init__(self):
  3.     self.selfless = lambda: print("I'm just a function.")
  4.   def method(self):
  5.     print("I'm a method!")
  6.    
  7. a = NoExplicit()
  8. a.selfless()
  9. a.method()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement