

@utils.positional((1 + _positional))
def __init__(self, name=None, indexed=None, repeated=None, required=None, default=None, choices=None, validator=None, verbose_name=None, write_empty_list=None):
    'Constructor.  For arguments see the module docstring.'
    if (name is not None):
        if isinstance(name, unicode):
            name = name.encode('utf-8')
        if (not isinstance(name, str)):
            raise TypeError(('Name %r is not a string' % (required,)))
        if ('.' in name):
            raise ValueError(('Name %r cannot contain period characters' % (name,)))
        self._name = name
    if (indexed is not None):
        self._indexed = indexed
    if (repeated is not None):
        self._repeated = repeated
    if (required is not None):
        self._required = required
    if (default is not None):
        self._default = default
    if (verbose_name is not None):
        self._verbose_name = verbose_name
    if (write_empty_list is not None):
        self._write_empty_list = write_empty_list
    if (self._repeated and (self._required or (self._default is not None))):
        raise ValueError('repeated is incompatible with required or default')
    if (choices is not None):
        if (not isinstance(choices, (list, tuple, set, frozenset))):
            raise TypeError(('choices must be a list, tuple or set; received %r' % choices))
        self._choices = frozenset(choices)
    if (validator is not None):
        if (not hasattr(validator, '__call__')):
            raise TypeError(('validator must be callable or None; received %r' % validator))
        self._validator = validator
    Property.__creation_counter_global += 1
    self._creation_counter = Property.__creation_counter_global

dataset/ETHPy150Open GoogleCloudPlatform/datastore-ndb-python/ndb/model.py Property.__init__/VarMisuse@110/160 `name`->`required`