Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import collections
- class Yoba:
- def __init__(self, commands):
- for name, cmd in commands:
- setattr(self, name, yoba(cmd=cmd))
- def yoba(self, *, **kwargs1):
- base = collections.ChainMap(kwargs1)
- def foo(self, **kwargs2):
- return self.execute(base.new_child(kwargs2))
- return foo
- yoba = Yoba((
- ("function1", "svarit_pelmeshki"),
- ("function2", "skushat_pelmeshku"),
- ))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement