Guest User

Untitled

a guest
Jan 24th, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. def blah():
  2. return "blah"
  3.  
  4. def lol():
  5. return "lol"
  6.  
  7. def command_aliaser(commandz):
  8. commands={}
  9. for k in commandz:
  10. for c in k.split():
  11. commands[c]=commandz[k]
  12. return commands
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19. commands = command_aliaser({
  20. 'foo bar':blah,
  21. 'lol lulz':blah
  22. })
  23.  
  24.  
  25. print commands
Add Comment
Please, Sign In to add comment