title: NDB Repeated Property List with 'None' Values
body: <p>I need a Property type that can set and get True, False and None values to NDB using the Python interface. For single Property attributes, this is fairly easy to do. </p>
  
  <p>For <strong>repeated</strong> Property attributes (repeated=True), however, it seems impossible to set a list item to None. Whichever approach I've tried, the NDB library raises exceptions.</p>
  
  <p>One attempt looks like this:</p>
  
  <pre><code>class LOGICAL(ndb.GenericProperty):
  
    def _set_value(self, entity, value):
      if isinstance(value, (list, tuple, set, frozenset)):
          for i, val in enumerate(value):
              if isinstance(val, str):
                  if val.lower() in ('unknown', 'none'):
                      value[i] = None
      if isinstance(value, str):
          if value.lower() in ('unknown', 'none'):
              value = None
      ndb.Property._set_value(self, entity, value)
  
    def _validate(self, value):
      if isinstance(value, str):
          if value.lower() == 'true':
              return True
          if value.lower() == 'false':
              return False
          raise AssertionError('LOGICAL must be one of "true","false","unknown","none" or'
                               'True, False, None.')
      if value is not None:
          assert isinstance(value, bool)
  </code></pre>
  
  <p>This code runs fine for single LOGICAL properties, but as soon as I want to assign a list such as [True,'false',None], None will be rejected. I get the following warnings from the 'machine' in the background and a long, long stack trace.</p>
  
  <pre><code>WARNING:root:initial generator _put_tasklet(context.py:270) raised AssertionError()
  WARNING:root:suspended generator put(context.py:748) raised AssertionError()
  </code></pre>
  
  <p>Please let me know if my task is an impossible one, or which approach to take.</p>