sync with Atlas repo

This commit is contained in:
Luciano Ramalho
2014-11-19 17:10:02 -02:00
parent b3e36a2a41
commit 2f495627fb
12 changed files with 183 additions and 112 deletions

View File

@@ -11,9 +11,9 @@ class BingoCage(Tombola): # <1>
def load(self, items):
self._balls.extend(items)
def pop(self):
def pick(self):
try:
position = random.randrange(len(self._balls)) # <4>
position = random.randrange(len(self._balls)) # <3>
except ValueError:
raise LookupError('pop from empty BingoCage')
return self._balls.pop(position)
return self._balls.pop(position) # <4>