Home
last modified time | relevance | path

Searched refs:kwds (Results 1 – 25 of 286) sorted by relevance

12345678910>>...12

/external/python/cpython3/Lib/email/
Dheaderregistry.py196 kwds = {'defects': []}
197 cls.parse(value, kwds)
198 if utils._has_surrogates(kwds['decoded']):
199 kwds['decoded'] = utils._sanitize(kwds['decoded'])
200 self = str.__new__(cls, kwds['decoded'])
201 del kwds['decoded']
202 self.init(name, **kwds)
268 def parse(cls, value, kwds): argument
269 kwds['parse_tree'] = cls.value_parser(value)
270 kwds['decoded'] = str(kwds['parse_tree'])
[all …]
/external/python/cpython3/Lib/lib2to3/fixes/
Dfix_apply.py36 kwds = results.get("kwds")
45 if kwds and (kwds.type == self.syms.argument and
46 kwds.children[0].value == '**'):
58 if kwds is not None:
59 kwds = kwds.clone()
60 kwds.prefix = ""
62 if kwds is not None:
65 kwds])
/external/python/cpython2/Lib/lib2to3/fixes/
Dfix_apply.py36 kwds = results.get("kwds")
45 if kwds and (kwds.type == self.syms.argument and
46 kwds.children[0].value == '**'):
58 if kwds is not None:
59 kwds = kwds.clone()
60 kwds.prefix = ""
62 if kwds is not None:
65 kwds])
/external/python/cpython3/Lib/
Dtypes.py57 def new_class(name, bases=(), kwds=None, exec_body=None): argument
59 meta, ns, kwds = prepare_class(name, bases, kwds)
62 return meta(name, bases, ns, **kwds)
64 def prepare_class(name, bases=(), kwds=None): argument
75 if kwds is None:
76 kwds = {}
78 kwds = dict(kwds) # Don't alter the provided mapping
79 if 'metaclass' in kwds:
80 meta = kwds.pop('metaclass')
91 ns = meta.__prepare__(name, bases, **kwds)
[all …]
Dcontextlib.py51 def inner(*args, **kwds): argument
53 return func(*args, **kwds)
60 def __init__(self, func, args, kwds): argument
61 self.gen = func(*args, **kwds)
62 self.func, self.args, self.kwds = func, args, kwds
78 return self.__class__(self.func, self.args, self.kwds)
158 def helper(*args, **kwds): argument
159 return _GeneratorContextManager(func, args, kwds)
308 def callback(self, callback, *args, **kwds): argument
314 callback(*args, **kwds)
Dfunctools.py300 func, args, kwds, namespace = state
302 (kwds is not None and not isinstance(kwds, dict)) or
307 if kwds is None:
308 kwds = {}
309 elif type(kwds) is not dict: # XXX does it need to be *exactly* dict?
310 kwds = dict(kwds)
317 self.keywords = kwds
421 def _make_key(args, kwds, typed, argument
436 if kwds:
438 for item in kwds.items():
[all …]
Dtyping.py134 def __init__(self, *args, **kwds): argument
160 def __init__(self, *args, **kwds): argument
163 def __new__(cls, *args, **kwds): argument
188 def __call__(self, *args, **kwds): argument
201 def __new__(cls, *args, _root=False, **kwds): argument
202 self = super().__new__(cls, *args, **kwds)
647 def inner(*args, **kwds): argument
649 return cached(*args, **kwds)
652 return func(*args, **kwds)
1176 def _generic_new(base_cls, cls, *args, **kwds): argument
[all …]
/external/python/cpython3/Lib/test/
Dtest_decorators.py3 def funcattrs(**kwds): argument
5 func.__dict__.update(kwds)
20 def __init__(self, exprstr, func, args, kwds): argument
23 (exprstr, func, args, kwds))
30 def check(*args, **kwds): argument
32 raise DbcheckError(exprstr, func, args, kwds)
33 return func(*args, **kwds)
44 def call(*args, **kwds): argument
46 return func(*args, **kwds)
96 def noteargs(*args, **kwds): argument
[all …]
Dtest_grammar.py348 def __prepare__(metacls, name, bases, **kwds): argument
626 def f(**kwds,): pass argument
628 def f(a, **kwds,): pass argument
631 def f(*args, **kwds,): pass argument
634 def f(a, *args, **kwds,): pass argument
635 def f(*args, b, **kwds,): pass argument
636 def f(*, b, **kwds,): pass argument
637 def f(a, *args, b, **kwds,): pass argument
638 def f(a, *, b, **kwds,): pass argument
661 l12 = lambda **kwds,: 0 argument
[all …]
/external/python/cpython2/Lib/test/
Dtest_decorators.py4 def funcattrs(**kwds): argument
6 func.__dict__.update(kwds)
21 def __init__(self, exprstr, func, args, kwds): argument
24 (exprstr, func, args, kwds))
31 def check(*args, **kwds): argument
33 raise DbcheckError(exprstr, func, args, kwds)
34 return func(*args, **kwds)
45 def call(*args, **kwds): argument
47 return func(*args, **kwds)
97 def noteargs(*args, **kwds): argument
[all …]
/external/python/cpython2/Lib/multiprocessing/
Dmanagers.py97 def dispatch(c, id, methodname, args=(), kwds={}): argument
101 c.send((id, methodname, args, kwds))
200 ignore, funcname, args, kwds = request
207 result = func(c, *args, **kwds)
241 ident, methodname, args, kwds = request
253 res = function(*args, **kwds)
272 self, conn, ident, obj, *args, **kwds
373 def create(self, c, typeid, *args, **kwds): argument
383 assert len(args) == 1 and not kwds
386 obj = callable(*args, **kwds)
[all …]
Dsharedctypes.py97 def Value(typecode_or_type, *args, **kwds): argument
101 lock = kwds.pop('lock', None)
102 if kwds:
103 raise ValueError('unrecognized keyword argument(s): %s' % kwds.keys())
113 def Array(typecode_or_type, size_or_initializer, **kwds): argument
117 lock = kwds.pop('lock', None)
118 if kwds:
119 raise ValueError('unrecognized keyword argument(s): %s' % kwds.keys())
D__init__.py248 def Value(typecode_or_type, *args, **kwds): argument
253 return Value(typecode_or_type, *args, **kwds)
255 def Array(typecode_or_type, size_or_initializer, **kwds): argument
260 return Array(typecode_or_type, size_or_initializer, **kwds)
/external/python/cpython3/Lib/multiprocessing/
Dmanagers.py74 def dispatch(c, id, methodname, args=(), kwds={}): argument
78 c.send((id, methodname, args, kwds))
188 ignore, funcname, args, kwds = request
195 result = func(c, *args, **kwds)
229 ident, methodname, args, kwds = request
248 res = function(*args, **kwds)
267 self, conn, ident, obj, *args, **kwds
347 def create(self, c, typeid, *args, **kwds): argument
356 assert len(args) == 1 and not kwds
359 obj = callable(*args, **kwds)
[all …]
Dspawn.py67 kwds = {}
71 kwds[name] = None
73 kwds[name] = int(value)
74 spawn_main(**kwds)
78 def get_command_line(**kwds): argument
84 ['%s=%r' % item for item in kwds.items()])
87 prog %= ', '.join('%s=%r' % item for item in kwds.items())
/external/python/cpython3/Objects/
Dnamespaceobject.c22 namespace_new(PyTypeObject *type, PyObject *args, PyObject *kwds) in namespace_new() argument
41 namespace_init(_PyNamespaceObject *ns, PyObject *args, PyObject *kwds) in namespace_init() argument
53 if (kwds == NULL) in namespace_init()
55 return PyDict_Update(ns->ns_dict, kwds); in namespace_init()
248 _PyNamespace_New(PyObject *kwds) in _PyNamespace_New() argument
254 if (kwds == NULL) in _PyNamespace_New()
256 if (PyDict_Update(((_PyNamespaceObject *)ns)->ns_dict, kwds) != 0) { in _PyNamespace_New()
/external/python/cpython2/Lib/
Dcollections.py50 def __init__(*args, **kwds): argument
69 self.__update(*args, **kwds)
458 def __init__(*args, **kwds): argument
477 self.update(*args, **kwds)
528 def update(*args, **kwds): argument
568 if kwds:
569 self.update(kwds)
571 def subtract(*args, **kwds): argument
603 if kwds:
604 self.subtract(kwds)
[all …]
/external/python/cpython3/Modules/
D_functoolsmodule.c421 keyobject_call(keyobject *ko, PyObject *args, PyObject *kwds);
461 keyobject_call(keyobject *ko, PyObject *args, PyObject *kwds) in keyobject_call() argument
467 if (!PyArg_ParseTupleAndKeywords(args, kwds, "O:K", kwargs, &object)) in keyobject_call()
525 functools_cmp_to_key(PyObject *self, PyObject *args, PyObject *kwds) in functools_cmp_to_key() argument
531 if (!PyArg_ParseTupleAndKeywords(args, kwds, "O:cmp_to_key", kwargs, &cmp)) in functools_cmp_to_key()
708 lru_cache_make_key(PyObject *args, PyObject *kwds, int typed) in lru_cache_make_key() argument
714 if (!typed && !kwds) { in lru_cache_make_key()
719 kwds_size = kwds ? PyDict_Size(kwds) : 0; in lru_cache_make_key()
741 for (pos = 0; PyDict_Next(kwds, &pos, &keyword, &value);) { in lru_cache_make_key()
756 for (pos = 0; PyDict_Next(kwds, &pos, &keyword, &value);) { in lru_cache_make_key()
[all …]
D_operator.c413 itemgetter_new(PyTypeObject *type, PyObject *args, PyObject *kwds) in itemgetter_new() argument
419 if (!_PyArg_NoKeywords("itemgetter()", kwds)) in itemgetter_new()
587 attrgetter_new(PyTypeObject *type, PyObject *args, PyObject *kwds) in attrgetter_new() argument
593 if (!_PyArg_NoKeywords("attrgetter()", kwds)) in attrgetter_new()
925 PyObject *kwds; member
931 methodcaller_new(PyTypeObject *type, PyObject *args, PyObject *kwds) in methodcaller_new() argument
959 Py_XINCREF(kwds); in methodcaller_new()
960 mc->kwds = kwds; in methodcaller_new()
978 Py_XDECREF(mc->kwds); in methodcaller_dealloc()
986 Py_VISIT(mc->kwds); in methodcaller_traverse()
[all …]
/external/python/cpython3/Lib/idlelib/idle_test/
Dmock_idle.py24 self.kwds = None
25 def __call__(self, *args, **kwds): argument
28 self.kwds = kwds
/external/python/cpython2/Lib/idlelib/idle_test/
Dmock_idle.py24 self.kwds = None
25 def __call__(self, *args, **kwds): argument
28 self.kwds = kwds
/external/python/cpython2/Modules/
Ditertoolsmodule.c25 groupby_new(PyTypeObject *type, PyObject *args, PyObject *kwds) in groupby_new() argument
31 if (!PyArg_ParseTupleAndKeywords(args, kwds, "O|O:groupby", kwargs, in groupby_new()
699 cycle_new(PyTypeObject *type, PyObject *args, PyObject *kwds) in cycle_new() argument
706 if (type == &cycle_type && !_PyArg_NoKeywords("cycle()", kwds)) in cycle_new()
851 dropwhile_new(PyTypeObject *type, PyObject *args, PyObject *kwds) in dropwhile_new() argument
857 if (type == &dropwhile_type && !_PyArg_NoKeywords("dropwhile()", kwds)) in dropwhile_new()
995 takewhile_new(PyTypeObject *type, PyObject *args, PyObject *kwds) in takewhile_new() argument
1001 if (type == &takewhile_type && !_PyArg_NoKeywords("takewhile()", kwds)) in takewhile_new()
1137 islice_new(PyTypeObject *type, PyObject *args, PyObject *kwds) in islice_new() argument
1145 if (type == &islice_type && !_PyArg_NoKeywords("islice()", kwds)) in islice_new()
[all …]
/external/tensorflow/tensorflow/python/eager/
Dbackprop.py439 def grad_fn(*args, **kwds): argument
441 return implicit_val_and_grad(f)(*args, **kwds)[1]
534 def decorated(*args, **kwds): argument
537 _, grad = val_and_grad_function(f, params=params)(*args, **kwds)
630 def decorated(*args, **kwds): argument
632 dy = kwds.pop("dy", None)
633 if kwds:
636 val, vjp = make_vjp(f, params)(*args, **kwds)
674 def decorated(*args, **kwds): argument
677 assert not kwds, "The gradient function can't take keyword arguments."
/external/python/cpython3/Python/
Dbltinmodule.c55 builtin___build_class__(PyObject *self, PyObject *args, PyObject *kwds) in builtin___build_class__() argument
90 if (kwds == NULL) { in builtin___build_class__()
95 mkw = PyDict_Copy(kwds); /* Don't modify kwds passed in! */ in builtin___build_class__()
221 builtin___import__(PyObject *self, PyObject *args, PyObject *kwds) in builtin___import__() argument
228 if (!PyArg_ParseTupleAndKeywords(args, kwds, "U|OOOi:__import__", in builtin___import__()
436 filter_new(PyTypeObject *type, PyObject *args, PyObject *kwds) in filter_new() argument
442 if (type == &PyFilter_Type && !_PyArg_NoKeywords("filter()", kwds)) in filter_new()
1125 map_new(PyTypeObject *type, PyObject *args, PyObject *kwds) in map_new() argument
1131 if (type == &PyMap_Type && !_PyArg_NoKeywords("map()", kwds)) in map_new()
1512 min_max(PyObject *args, PyObject *kwds, int op) in min_max() argument
[all …]
/external/python/cpython3/Modules/_ctypes/
D_ctypes.c360 StructUnionType_new(PyTypeObject *type, PyObject *args, PyObject *kwds, int isStruct) in StructUnionType_new() argument
368 result = (PyTypeObject *)PyType_Type.tp_new(type, args, kwds); in StructUnionType_new()
421 PyCStructType_new(PyTypeObject *type, PyObject *args, PyObject *kwds) in PyCStructType_new() argument
423 return StructUnionType_new(type, args, kwds, 1); in PyCStructType_new()
427 UnionType_new(PyTypeObject *type, PyObject *args, PyObject *kwds) in UnionType_new() argument
429 return StructUnionType_new(type, args, kwds, 0); in UnionType_new()
528 GenericPyCData_new(PyTypeObject *type, PyObject *args, PyObject *kwds);
894 PyCPointerType_new(PyTypeObject *type, PyObject *args, PyObject *kwds) in PyCPointerType_new() argument
950 result = (PyTypeObject *)PyType_Type.tp_new(type, args, kwds); in PyCPointerType_new()
1315 PyCArrayType_new(PyTypeObject *type, PyObject *args, PyObject *kwds) in PyCArrayType_new() argument
[all …]

12345678910>>...12