text: # 一个子类： 使用一个更好的随机发生器
  import sys
  sys.path.extend(r'/Users/liuzhongkai/Documents/Git/PythonScript/FluentPython/chapter11_Tombola/')
  
  import random
  from tombola import Tombola
  
  class BingoCage(Tombola):
  
      def __init__(self, items):
          self._randomizer = random.SystemRandom()
          self._items = []
          self.load(items)
  
      def load(self, items):
          self._items.extend(items)
          self._randomizer.shuffle(self._items)
  
      def pick(self):
          try:
              return self._items.pop()
          except IndexError:
              raise LookupError('pick from empty BingoCage')
  
      def __call__(self):
          self.pick()