Searched defs:keyword (Results 1 - 15 of 15) sorted by relevance

/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.2/Lib/
H A Drlcompleter.py107 import keyword namespace
110 for word in keyword.kwlist:
H A Dcgitb.py25 import keyword namespace
86 if ttype == tokenize.NAME and token not in keyword.kwlist:
/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.2/Lib/test/
H A Dtest_pydoc.py9 import keyword namespace
358 sorted(keyword.kwlist))
H A Dtest_sundry.py54 import keyword namespace
H A Dtest_collections.py9 import keyword namespace
31 self.assertRaises(ValueError, namedtuple, 'class', 'efg ghi') # type has keyword
35 self.assertRaises(ValueError, namedtuple, 'abc', 'abc class') # field has keyword
60 [('abc', 'class'), ('abc', '_1')], # field has keyword
78 self.assertRaises(TypeError, eval, 'Point(XXX=1, y=2)', locals()) # wrong keyword argument
79 self.assertRaises(TypeError, eval, 'Point(x=1)', locals()) # missing keyword argument
193 words -= set(keyword.kwlist)
/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.10/Python/
H A Dgetargs.c1417 /* Support for keyword arguments donated by
1544 const char *fname, *msg, *custom_msg, *keyword; local
1584 /* convert tuple args and keyword args in same loop, using kwlist to drive process */
1586 keyword = kwlist[i];
1593 "More keyword list entries (%d) than "
1599 current_arg = PyDict_GetItemString(keywords, keyword);
1608 keyword, i+1);
1630 keyword, i+1);
1634 * fulfilled and no keyword args left, with no further
1641 * keyword arg
[all...]
H A Dceval.c3101 PyObject *keyword = kws[2*i]; local
3104 if (keyword == NULL || !(PyString_Check(keyword)
3106 || PyUnicode_Check(keyword)
3119 if (nm == keyword)
3126 keyword, nm, Py_EQ);
3133 PyObject *kwd_str = kwd_as_string(keyword);
3137 "keyword argument '%.400s'",
3144 PyDict_SetItem(kwdict, keyword, value);
3148 PyObject *kwd_str = kwd_as_string(keyword);
[all...]
H A DPython-ast.c961 keyword_type = make_type("keyword", &AST_type, keyword_fields, 2);
2094 keyword(identifier arg, expr_ty value, PyArena *arena) function
2099 "field arg is required for keyword");
2104 "field value is required for keyword");
6519 PyErr_SetString(PyExc_TypeError, "required field \"arg\" missing from keyword");
6531 PyErr_SetString(PyExc_TypeError, "required field \"value\" missing from keyword");
6534 *out = keyword(arg, value, arena);
6736 if (PyDict_SetItemString(d, "keyword", (PyObject*)keyword_type) < 0)
/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.2/Python/
H A Dgetargs.c1417 /* Support for keyword arguments donated by
1544 const char *fname, *msg, *custom_msg, *keyword; local
1584 /* convert tuple args and keyword args in same loop, using kwlist to drive process */
1586 keyword = kwlist[i];
1593 "More keyword list entries (%d) than "
1599 current_arg = PyDict_GetItemString(keywords, keyword);
1608 keyword, i+1);
1630 keyword, i+1);
1634 * fulfilled and no keyword args left, with no further
1641 * keyword arg
[all...]
H A Dceval.c3086 PyObject *keyword = kws[2*i]; local
3089 if (keyword == NULL || !(PyString_Check(keyword)
3091 || PyUnicode_Check(keyword)
3104 if (nm == keyword)
3111 keyword, nm, Py_EQ);
3118 PyObject *kwd_str = kwd_as_string(keyword);
3122 "keyword argument '%.400s'",
3129 PyDict_SetItem(kwdict, keyword, value);
3133 PyObject *kwd_str = kwd_as_string(keyword);
[all...]
H A DPython-ast.c944 keyword_type = make_type("keyword", &AST_type, keyword_fields, 2);
2077 keyword(identifier arg, expr_ty value, PyArena *arena) function
2082 "field arg is required for keyword");
2087 "field value is required for keyword");
6502 PyErr_SetString(PyExc_TypeError, "required field \"arg\" missing from keyword");
6514 PyErr_SetString(PyExc_TypeError, "required field \"value\" missing from keyword");
6517 *out = keyword(arg, value, arena);
6719 if (PyDict_SetItemString(d, "keyword", (PyObject*)keyword_type) < 0)
/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.10/Include/
H A DPython-ast.h528 #define keyword(a0, a1, a2) _Py_keyword(a0, a1, a2) macro
/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.2/Include/
H A DPython-ast.h528 #define keyword(a0, a1, a2) _Py_keyword(a0, a1, a2) macro
/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.10/Lib/pydoc_data/
H A Dtopics.py19 'calls': u'\nCalls\n*****\n\nA call calls a callable object (e.g., a *function*) with a possibly\nempty series of *arguments*:\n\n call ::= primary "(" [argument_list [","]\n | expression genexpr_for] ")"\n argument_list ::= positional_arguments ["," keyword_arguments]\n ["," "*" expression] ["," keyword_arguments]\n ["," "**" expression]\n | keyword_arguments ["," "*" expression]\n ["," "**" expression]\n | "*" expression ["," keyword_arguments] ["," "**" expression]\n | "**" expression\n positional_arguments ::= expression ("," expression)*\n keyword_arguments ::= keyword_item ("," keyword_item)*\n keyword_item ::= identifier "=" expression\n\nA trailing comma may be present after the positional and keyword\narguments but does not affect the semantics.\n\nThe primary must evaluate to a callable object (user-defined\nfunctions, built-in functions, methods of built-in objects, class\nobjects, methods of class instances, and certain class instances\nthemselves are callable; extensions may define additional callable\nobject types). All argument expressions are evaluated before the call\nis attempted. Please refer to section Function definitions for the\nsyntax of formal *parameter* lists.\n\nIf keyword arguments are present, they are first converted to\npositional arguments, as follows. First, a list of unfilled slots is\ncreated for the formal parameters. If there are N positional\narguments, they are placed in the first N slots. Next, for each\nkeyword argument, the identifier is used to determine the\ncorresponding slot (if the identifier is the same as the first formal\nparameter name, the first slot is used, and so on). If the slot is\nalready filled, a "TypeError" exception is raised. Otherwise, the\nvalue of the argument is placed in the slot, filling it (even if the\nexpression is "None", it fills the slot). When all arguments have\nbeen processed, the slots that are still unfilled are filled with the\ncorresponding default value from the function definition. (Default\nvalues are calculated, once, when the function is defined; thus, a\nmutable object such as a list or dictionary used as default value will\nbe shared by all calls that don\'t specify an argument value for the\ncorresponding slot; this should usually be avoided.) If there are any\nunfilled slots for which no default value is specified, a "TypeError"\nexception is raised. Otherwise, the list of filled slots is used as\nthe argument list for the call.\n\n**CPython implementation detail:** An implementation may provide\nbuilt-in functions whose positional parameters do not have names, even\nif they are \'named\' for the purpose of documentation, and which\ntherefore cannot be supplied by keyword. In CPython, this is the case\nfor functions implemented in C that use "PyArg_ParseTuple()" to parse\ntheir arguments.\n\nIf there are more positional arguments than there are formal parameter\nslots, a "TypeError" exception is raised, unless a formal parameter\nusing the syntax "*identifier" is present; in this case, that formal\nparameter receives a tuple containing the excess positional arguments\n(or an empty tuple if there were no excess positional arguments).\n\nIf any keyword argument does not correspond to a formal parameter\nname, a "TypeError" exception is raised, unless a formal parameter\nusing the syntax "**identifier" is present; in this case, that formal\nparameter receives a dictionary containing the excess keyword\narguments (using the keywords as keys and the argument values as\ncorresponding values), or a (new) empty dictionary if there were no\nexcess keyword arguments.\n\nIf the syntax "*expression" appears in the function call, "expression"\nmust evaluate to an iterable. Elements from this iterable are treated\nas if they were additional positional arguments; if there are\npositional arguments *x1*, ..., *xN*, and "expression" evaluates to a\nsequence *y1*, ..., *yM*, this is equivalent to a call with M+N\npositional arguments *x1*, ..., *xN*, *y1*, ..., *yM*.\n\nA consequence of this is that although the "*expression" syntax may\nappear *after* some keyword arguments, it is processed *before* the\nkeyword arguments (and the "**expression" argument, if any -- see\nbelow). So:\n\n >>> def f(a, b):\n ... print a, b\n ...\n >>> f(b=1, *(2,))\n 2 1\n >>> f(a=1, *(2,))\n Traceback (most recent call last):\n File "<stdin>", line 1, in ?\n TypeError: f() got multiple values for keyword argument \'a\'\n >>> f(1, *(2,))\n 1 2\n\nIt is unusual for both keyword arguments and the "*expression" syntax\nto be used in the same call, so in practice this confusion does not\narise.\n\nIf the syntax "**expression" appears in the function call,\n"expression" must evaluate to a mapping, the contents of which are\ntreated as additional keyword argument
42 'identifiers': u'\\nIdentifiers and keywords\\n************************\\n\\nIdentifiers (also referred to as *names*) are described by the\\nfollowing lexical definitions:\\n\\n identifier ::= (letter|"_") (letter | digit | "_")*\\n letter ::= lowercase | uppercase\\n lowercase ::= "a"..."z"\\n uppercase ::= "A"..."Z"\\n digit ::= "0"..."9"\\n\\nIdentifiers are unlimited in length. Case is significant.\\n\\n\\nKeywords\\n========\\n\\nThe following identifiers are used as reserved words, or *keywords* of\\nthe language, and cannot be used as ordinary identifiers. They must\\nbe spelled exactly as written here:\\n\\n and del from not while\\n as elif global or with\\n assert else if pass yield\\n break except import print\\n class exec in raise\\n continue finally is return\\n def for lambda try\\n\\nChanged in version 2.4: "None" became a constant and is now recognized\\nby the compiler as a name for the built-in object "None". Although it\\nis not a keyword, you cannot assign a different object to it.\\n\\nChanged in version 2.5: Using "as" and "with" as identifiers triggers\\na warning. To use them as keywords, enable the "with_statement"\\nfuture feature .\\n\\nChanged in version 2.6: "as" and "with" are full keywords.\\n\\n\\nReserved classes of identifiers\\n===============================\\n\\nCertain classes of identifiers (besides keywords) have special\\nmeanings. These classes are identified by the patterns of leading and\\ntrailing underscore characters:\\n\\n"_*"\\n Not imported by "from module import *". The special identifier "_"\\n is used in the interactive interpreter to store the result of the\\n last evaluation; it is stored in the "__builtin__" module. When\\n not in interactive mode, "_" has no special meaning and is not\\n defined. See section The import statement.\\n\\n Note: The name "_" is often used in conjunction with\\n internationalization; refer to the documentation for the\\n "gettext" module for more information on this convention.\\n\\n"__*__"\\n System-defined names. These names are defined by the interpreter\\n and its implementation (including the standard library). Current\\n system names are discussed in the Special method names section and\\n elsewhere. More will likely be defined in future versions of\\n Python. *Any* use of "__*__" names, in any context, that does not\\n follow explicitly documented use, is subject to breakage without\\n warning.\\n\\n"__*"\\n Class-private names. Names in this category, when used within the\\n context of a class definition, are re-written to use a mangled form\\n to help avoid name clashes between "private" attributes of base and\\n derived classes. See section Identifiers (Names).\\n', namespace
[all...]
/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.2/Lib/pydoc_data/
H A Dtopics.py19 'calls': u'\nCalls\n*****\n\nA call calls a callable object (e.g., a function) with a possibly\nempty series of arguments:\n\n call ::= primary "(" [argument_list [","]\n | expression genexpr_for] ")"\n argument_list ::= positional_arguments ["," keyword_arguments]\n ["," "*" expression] ["," keyword_arguments]\n ["," "**" expression]\n | keyword_arguments ["," "*" expression]\n ["," "**" expression]\n | "*" expression ["," "*" expression] ["," "**" expression]\n | "**" expression\n positional_arguments ::= expression ("," expression)*\n keyword_arguments ::= keyword_item ("," keyword_item)*\n keyword_item ::= identifier "=" expression\n\nA trailing comma may be present after the positional and keyword\narguments but does not affect the semantics.\n\nThe primary must evaluate to a callable object (user-defined\nfunctions, built-in functions, methods of built-in objects, class\nobjects, methods of class instances, and certain class instances\nthemselves are callable; extensions may define additional callable\nobject types). All argument expressions are evaluated before the call\nis attempted. Please refer to section *Function definitions* for the\nsyntax of formal parameter lists.\n\nIf keyword arguments are present, they are first converted to\npositional arguments, as follows. First, a list of unfilled slots is\ncreated for the formal parameters. If there are N positional\narguments, they are placed in the first N slots. Next, for each\nkeyword argument, the identifier is used to determine the\ncorresponding slot (if the identifier is the same as the first formal\nparameter name, the first slot is used, and so on). If the slot is\nalready filled, a ``TypeError`` exception is raised. Otherwise, the\nvalue of the argument is placed in the slot, filling it (even if the\nexpression is ``None``, it fills the slot). When all arguments have\nbeen processed, the slots that are still unfilled are filled with the\ncorresponding default value from the function definition. (Default\nvalues are calculated, once, when the function is defined; thus, a\nmutable object such as a list or dictionary used as default value will\nbe shared by all calls that don\'t specify an argument value for the\ncorresponding slot; this should usually be avoided.) If there are any\nunfilled slots for which no default value is specified, a\n``TypeError`` exception is raised. Otherwise, the list of filled\nslots is used as the argument list for the call.\n\n**CPython implementation detail:** An implementation may provide\nbuilt-in functions whose positional parameters do not have names, even\nif they are \'named\' for the purpose of documentation, and which\ntherefore cannot be supplied by keyword. In CPython, this is the case\nfor functions implemented in C that use ``PyArg_ParseTuple()`` to\nparse their arguments.\n\nIf there are more positional arguments than there are formal parameter\nslots, a ``TypeError`` exception is raised, unless a formal parameter\nusing the syntax ``*identifier`` is present; in this case, that formal\nparameter receives a tuple containing the excess positional arguments\n(or an empty tuple if there were no excess positional arguments).\n\nIf any keyword argument does not correspond to a formal parameter\nname, a ``TypeError`` exception is raised, unless a formal parameter\nusing the syntax ``**identifier`` is present; in this case, that\nformal parameter receives a dictionary containing the excess keyword\narguments (using the keywords as keys and the argument values as\ncorresponding values), or a (new) empty dictionary if there were no\nexcess keyword arguments.\n\nIf the syntax ``*expression`` appears in the function call,\n``expression`` must evaluate to a sequence. Elements from this\nsequence are treated as if they were additional positional arguments;\nif there are positional arguments *x1*,..., *xN*, and ``expression``\nevaluates to a sequence *y1*, ..., *yM*, this is equivalent to a call\nwith M+N positional arguments *x1*, ..., *xN*, *y1*, ..., *yM*.\n\nA consequence of this is that although the ``*expression`` syntax may\nappear *after* some keyword arguments, it is processed *before* the\nkeyword arguments (and the ``**expression`` argument, if any -- see\nbelow). So:\n\n >>> def f(a, b):\n ... print a, b\n ...\n >>> f(b=1, *(2,))\n 2 1\n >>> f(a=1, *(2,))\n Traceback (most recent call last):\n File "<stdin>", line 1, in ?\n TypeError: f() got multiple values for keyword argument \'a\'\n >>> f(1, *(2,))\n 1 2\n\nIt is unusual for both keyword arguments and the ``*expression``\nsyntax to be used in the same call, so in practice this confusion does\nnot arise.\n\nIf the syntax ``**expression`` appears in the function call,\n``expression`` must evaluate to a mapping, the contents of which are\ntreated as additional keyword argument
43 'identifiers': u'\\nIdentifiers and keywords\\n************************\\n\\nIdentifiers (also referred to as *names*) are described by the\\nfollowing lexical definitions:\\n\\n identifier ::= (letter|"_") (letter | digit | "_")*\\n letter ::= lowercase | uppercase\\n lowercase ::= "a"..."z"\\n uppercase ::= "A"..."Z"\\n digit ::= "0"..."9"\\n\\nIdentifiers are unlimited in length. Case is significant.\\n\\n\\nKeywords\\n========\\n\\nThe following identifiers are used as reserved words, or *keywords* of\\nthe language, and cannot be used as ordinary identifiers. They must\\nbe spelled exactly as written here:\\n\\n and del from not while\\n as elif global or with\\n assert else if pass yield\\n break except import print\\n class exec in raise\\n continue finally is return\\n def for lambda try\\n\\nChanged in version 2.4: ``None`` became a constant and is now\\nrecognized by the compiler as a name for the built-in object ``None``.\\nAlthough it is not a keyword, you cannot assign a different object to\\nit.\\n\\nChanged in version 2.5: Both ``as`` and ``with`` are only recognized\\nwhen the ``with_statement`` future feature has been enabled. It will\\nalways be enabled in Python 2.6. See section *The with statement* for\\ndetails. Note that using ``as`` and ``with`` as identifiers will\\nalways issue a warning, even when the ``with_statement`` future\\ndirective is not in effect.\\n\\n\\nReserved classes of identifiers\\n===============================\\n\\nCertain classes of identifiers (besides keywords) have special\\nmeanings. These classes are identified by the patterns of leading and\\ntrailing underscore characters:\\n\\n``_*``\\n Not imported by ``from module import *``. The special identifier\\n ``_`` is used in the interactive interpreter to store the result of\\n the last evaluation; it is stored in the ``__builtin__`` module.\\n When not in interactive mode, ``_`` has no special meaning and is\\n not defined. See section *The import statement*.\\n\\n Note: The name ``_`` is often used in conjunction with\\n internationalization; refer to the documentation for the\\n ``gettext`` module for more information on this convention.\\n\\n``__*__``\\n System-defined names. These names are defined by the interpreter\\n and its implementation (including the standard library). Current\\n system names are discussed in the *Special method names* section\\n and elsewhere. More will likely be defined in future versions of\\n Python. *Any* use of ``__*__`` names, in any context, that does\\n not follow explicitly documented use, is subject to breakage\\n without warning.\\n\\n``__*``\\n Class-private names. Names in this category, when used within the\\n context of a class definition, are re-written to use a mangled form\\n to help avoid name clashes between "private" attributes of base and\\n derived classes. See section *Identifiers (Names)*.\\n', namespace
[all...]

Completed in 207 milliseconds