(self, reqs)
| 57 | self.atts = atts |
| 58 | |
| 59 | def score(self, reqs): |
| 60 | sc = 0 |
| 61 | for key,val in reqs.items(): |
| 62 | if key in self.atts: |
| 63 | if val == self.atts[key]: |
| 64 | sc += 2**self.IMPORTANCE[key] |
| 65 | else: # requirement not satisifed |
| 66 | return 0 |
| 67 | return sc |
| 68 | |
| 69 | def __repr__(self): |
| 70 | return repr(self.atts) |