Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def extender(cls):
- cls.hello = lambda self, name: print(f'Hello, {name}')
- return cls
- @extender
- class Client:
- pass
- c = Client()
- c.hello('Tom')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement