Skip to content

Commit

Permalink
Implement __contains__() special method for TaskRegistry class
Browse files Browse the repository at this point in the history
  • Loading branch information
dnaeon committed Jan 26, 2015
1 parent 86319b1 commit 3ca7c39
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/vpoller/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ class TaskRegistry(object):
def __init__(self):
self._registry = {}

def __contains__(self, item):
return item in self._registry

def register(self, name, required, fn):
"""
Register a new task
Expand Down

0 comments on commit 3ca7c39

Please sign in to comment.