Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2016
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. import collections
  2.  
  3. class Yoba:
  4.  
  5. def __init__(self, commands):
  6. for name, cmd in commands:
  7. setattr(self, name, yoba(cmd=cmd))
  8.  
  9. def yoba(self, *, **kwargs1):
  10. base = collections.ChainMap(kwargs1)
  11. def foo(self, **kwargs2):
  12. return self.execute(base.new_child(kwargs2))
  13. return foo
  14.  
  15. yoba = Yoba((
  16. ("function1", "svarit_pelmeshki"),
  17. ("function2", "skushat_pelmeshku"),
  18. ))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement