Browse Source

Added TaskSetResult.__getitem__

Ask Solem 14 years ago
parent
commit
46acfab72c
1 changed files with 3 additions and 0 deletions
  1. 3 0
      celery/result.py

+ 3 - 0
celery/result.py

@@ -259,6 +259,9 @@ class TaskSetResult(object):
         """``iter(res)`` -> ``res.iterate()``."""
         return self.iterate()
 
+    def __getitem__(self, index):
+        return self.subtasks[index]
+
     def iterate(self):
         """Iterate over the return values of the tasks as they finish
         one by one.