Advertisement
Guest User

Untitled

a guest
Jun 27th, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.33 KB | None | 0 0
  1. def filter(self, **kwargs):
  2.     for key, value in self.skills.iteritems():
  3.         possible = True
  4.        
  5.         for arg in kwargs:
  6.             fun = getattr(self, "filter_" + arg)
  7.             possible = fun(kwargs[arg])
  8.             if not possible:
  9.                 break
  10.        
  11.         if possible:
  12.             yield key
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement