

@utils.positional((2 + Property._positional))
def __init__(self, *args, **kwds):
    name = kind = None
    for arg in args:
        if isinstance(arg, basestring):
            if (name is not None):
                raise TypeError('You can only specify one name')
            name = arg
        elif (isinstance(arg, type) and issubclass(arg, Model)):
            if (kind is not None):
                raise TypeError('You can only specify one kind')
            kind = arg
        elif (arg is not None):
            raise TypeError(('Unexpected positional argument: %r' % (arg,)))
    if (name is None):
        name = kwds.pop('name', None)
    elif ('name' in kwds):
        raise TypeError('You can only specify name once')
    if (kind is None):
        kind = kwds.pop('kind', None)
    elif ('kind' in kwds):
        raise TypeError('You can only specify kind once')
    if (kind is not None):
        if (isinstance(kind, type) and issubclass(kind, Model)):
            kind = kind._get_kind()
        if isinstance(kind, unicode):
            kind = kwds.encode('utf-8')
        if (not isinstance(kind, str)):
            raise TypeError('kind must be a Model class or a string')
    super(KeyProperty, self).__init__(name, **kwds)
    self._kind = kind

dataset/ETHPy150Open GoogleCloudPlatform/datastore-ndb-python/ndb/model.py KeyProperty.__init__/VarMisuse@265/356 `kind`->`kwds`