Searched defs:sub (Results 201 - 225 of 291) sorted by relevance

1234567891011>>

/external/iproute2/lib/
H A Dbpf.c1402 char tmp[PATH_MAX], rem[PATH_MAX], *sub; local
1407 sub = strtok(rem, "/");
1409 while (sub) {
1410 if (strlen(tmp) + strlen(sub) + 2 > PATH_MAX)
1413 strcat(tmp, sub);
1423 sub = strtok(NULL, "/");
/external/libedit/src/
H A Dreadline.c510 int idx, sign, sub, num, begin, ret; local
550 sub = 0;
552 sub = 1;
559 if (sub && cmd[idx] == '?')
561 if (!sub && (cmd[idx] == ':' || cmd[idx] == ' '
567 if (sub && cmd[idx] == '?')
569 if (sub && len == 0 && last_search_pat && *last_search_pat)
587 if (sub) {
606 if (sub && len) {
/external/python/cpython2/Objects/
H A Dstringobject.c1457 const char *s = PyString_AS_STRING(self), *sub; local
1467 sub = PyString_AS_STRING(subobj);
1474 else if (PyObject_AsCharBuffer(subobj, &sub, &n))
1477 return stringlib_split((PyObject*) self, s, len, sub, n, maxsplit);
1556 const char *s = PyString_AS_STRING(self), *sub; local
1566 sub = PyString_AS_STRING(subobj);
1573 else if (PyObject_AsCharBuffer(subobj, &sub, &n))
1576 return stringlib_rsplit((PyObject*) self, s, len, sub, n, maxsplit);
1710 const char *sub; local
1719 sub
2123 const char *str = PyString_AS_STRING(self), *sub; local
2871 const char* sub; local
[all...]
/external/python/cpython2/Python/
H A Dcompile.c1707 even if hidden in a sub-try or except. */
3372 slice_ty sub = (slice_ty)asdl_seq_GET( local
3374 if (!compiler_visit_nested_slice(c, sub, ctx))
/external/python/cpython3/Objects/
H A Dbytesobject.c1769 const char *s = PyBytes_AS_STRING(self), *sub; local
1779 sub = vsub.buf;
1782 list = stringlib_split((PyObject*) self, s, len, sub, n, maxsplit);
1854 const char *s = PyBytes_AS_STRING(self), *sub; local
1864 sub = vsub.buf;
1867 list = stringlib_rsplit((PyObject*) self, s, len, sub, n, maxsplit);
/external/swiftshader/src/Shader/
H A DShaderCore.cpp289 // !pp : 17 mul, 7 add, 1 sub, 1 reciprocal
675 void ShaderCore::sub(Vector4f &dst, const Vector4f &src0, const Vector4f &src1) function in class:sw::ShaderCore
/external/v8/src/compiler/arm64/
H A Dinstruction-selector-arm64.cc2076 Node* sub = m.right().node(); local
2077 Int32BinopMatcher msub(sub);
2079 bool can_cover = selector->CanCover(node, sub);
2089 if (can_cover) sub->ReplaceInput(1, msub.left().node());
/external/v8/src/crankshaft/arm/
H A Dlithium-arm.cc116 case Token::SUB: return "sub-d";
130 case Token::SUB: return "sub-t";
1477 // This mul is the rhs of a sub. The sub and mul will be folded into a
1478 // multiply-sub in DoSub.
1502 LSubI* sub = new(zone()) LSubI(left, right); local
1503 LInstruction* result = DefineAsRegister(sub);
/external/v8/src/crankshaft/ia32/
H A Dlithium-ia32.cc135 case Token::SUB: return "sub-d";
149 case Token::SUB: return "sub-t";
1501 LSubI* sub = new(zone()) LSubI(left, right); local
1502 LInstruction* result = DefineSameAsFirst(sub);
/external/v8/src/crankshaft/mips/
H A Dlithium-mips.cc118 case Token::SUB: return "sub-d";
132 case Token::SUB: return "sub-t";
1482 LSubI* sub = new(zone()) LSubI(left, right); local
1483 LInstruction* result = DefineAsRegister(sub);
/external/v8/src/crankshaft/ppc/
H A Dlithium-ppc.cc116 return "sub-d";
135 return "sub-t";
1496 LSubI* sub = new (zone()) LSubI(left, right); local
1497 LInstruction* result = DefineAsRegister(sub);
/external/v8/src/crankshaft/s390/
H A Dlithium-s390.cc109 return "sub-d";
127 return "sub-t";
1360 LSubI* sub = new (zone()) LSubI(left, right); local
1361 LInstruction* result = DefineAsRegister(sub);
/external/v8/src/crankshaft/x64/
H A Dlithium-x64.cc120 case Token::SUB: return "sub-d";
134 case Token::SUB: return "sub-t";
1500 LSubI* sub = new(zone()) LSubI(left, right); local
1501 LInstruction* result = DefineSameAsFirst(sub);
/external/v8/src/crankshaft/x87/
H A Dlithium-x87.cc146 case Token::SUB: return "sub-d";
160 case Token::SUB: return "sub-t";
1508 LSubI* sub = new(zone()) LSubI(left, right); local
1509 LInstruction* result = DefineSameAsFirst(sub);
/external/valgrind/coregrind/m_demangle/
H A Dcp-demangle.c852 d_dump (dc->u.s_unary_num.sub, indent+2);
856 d_dump (dc->u.s_unary_num.sub, indent+2);
1134 struct demangle_component *sub)
1141 p->u.s_unary_num.sub = sub;
2810 d_ref_qualifier (struct d_info *di, struct demangle_component *sub) argument
2812 struct demangle_component *ret = sub;
3702 ret->u.s_unary_num.sub = tl;
4155 dc->u.s_unary_num.sub);
4683 local_name = local_name->u.s_unary_num.sub;
1133 d_make_default_arg(struct d_info *di, int num, struct demangle_component *sub) argument
5021 struct demangle_component *sub = d_left (dc); local
[all...]
/external/clang/lib/Sema/
H A DSemaExprObjC.cpp4161 Expr *sub = stripARCUnbridgedCast(pe->getSubExpr()); local
4162 return new (Context) ParenExpr(pe->getLParen(), pe->getRParen(), sub);
4165 Expr *sub = stripARCUnbridgedCast(uo->getSubExpr()); local
4166 return new (Context) UnaryOperator(sub, UO_Extension, sub->getType(),
4167 sub->getValueKind(), sub->getObjectKind(),
4177 Expr *sub = gse->getAssocExpr(i); local
4179 sub = stripARCUnbridgedCast(sub);
[all...]
/external/deqp/modules/gles3/functional/
H A Des3fUniformApiTests.cpp475 UniformCollection* const sub = basic(types[i], ("_" + de::toString(i) + nameSuffix).c_str()); local
476 sub->moveContents(*res);
477 delete sub;
490 UniformCollection* const sub = basicArray(types[i], ("_" + de::toString(i) + nameSuffix).c_str()); local
491 sub->moveContents(*res);
492 delete sub;
508 UniformCollection* const sub = nestedArraysStructs(types0[i], types1[i], ("_" + de::toString(i) + nameSuffix).c_str()); local
509 sub->moveContents(*res);
510 delete sub;
/external/icu/icu4c/source/i18n/
H A DdecNumber.cpp1786 uByte sub; /* add or subtract */ local
1795 sub=0; /* add, please */
1804 sub=DECNEG; /* subtract, please */
1809 decAddOp(res, lhs, &dtiny, &workset, sub, &status); /* + or - */
/external/oj-libjdwp/src/share/javavm/export/
H A Djni.h237 (JNIEnv *env, jclass sub);
239 (JNIEnv *env, jclass sub, jclass sup);
807 jclass GetSuperclass(jclass sub) { argument
808 return functions->GetSuperclass(this, sub);
810 jboolean IsAssignableFrom(jclass sub, jclass sup) { argument
811 return functions->IsAssignableFrom(this, sub, sup);
/external/python/cpython2/Lib/pydoc_data/
H A Dtopics.py66 'string-methods': u'\nString Methods\n**************\n\nBelow are listed the string methods which both 8-bit strings and\nUnicode objects support. Some of them are also available on\n"bytearray" objects.\n\nIn addition, Python\'s strings support the sequence type methods\ndescribed in the Sequence Types --- str, unicode, list, tuple,\nbytearray, buffer, xrange section. To output formatted strings use\ntemplate strings or the "%" operator described in the String\nFormatting Operations section. Also, see the "re" module for string\nfunctions based on regular expressions.\n\nstr.capitalize()\n\n Return a copy of the string with its first character capitalized\n and the rest lowercased.\n\n For 8-bit strings, this method is locale-dependent.\n\nstr.center(width[, fillchar])\n\n Return centered in a string of length *width*. Padding is done\n using the specified *fillchar* (default is a space).\n\n Changed in version 2.4: Support for the *fillchar* argument.\n\nstr.count(sub[, start[, end]])\n\n Return the number of non-overlapping occurrences of substring *sub*\n in the range [*start*, *end*]. Optional arguments *start* and\n *end* are interpreted as in slice notation.\n\nstr.decode([encoding[, errors]])\n\n Decodes the string using the codec registered for *encoding*.\n *encoding* defaults to the default string encoding. *errors* may\n be given to set a different error handling scheme. The default is\n "\'strict\'", meaning that encoding errors raise "UnicodeError".\n Other possible values are "\'ignore\'", "\'replace\'" and any other\n name registered via "codecs.register_error()", see section Codec\n Base Classes.\n\n New in version 2.2.\n\n Changed in version 2.3: Support for other error handling schemes\n added.\n\n Changed in version 2.7: Support for keyword arguments added.\n\nstr.encode([encoding[, errors]])\n\n Return an encoded version of the string. Default encoding is the\n current default string encoding. *errors* may be given to set a\n different error handling scheme. The default for *errors* is\n "\'strict\'", meaning that encoding errors raise a "UnicodeError".\n Other possible values are "\'ignore\'", "\'replace\'",\n "\'xmlcharrefreplace\'", "\'backslashreplace\'" and any other name\n registered via "codecs.register_error()", see section Codec Base\n Classes. For a list of possible encodings, see section Standard\n Encodings.\n\n New in version 2.0.\n\n Changed in version 2.3: Support for "\'xmlcharrefreplace\'" and\n "\'backslashreplace\'" and other error handling schemes added.\n\n Changed in version 2.7: Support for keyword arguments added.\n\nstr.endswith(suffix[, start[, end]])\n\n Return "True" if the string ends with the specified *suffix*,\n otherwise return "False". *suffix* can also be a tuple of suffixes\n to look for. With optional *start*, test beginning at that\n position. With optional *end*, stop comparing at that position.\n\n Changed in version 2.5: Accept tuples as *suffix*.\n\nstr.expandtabs([tabsize])\n\n Return a copy of the string where all tab characters are replaced\n by one or more spaces, depending on the current column and the\n given tab size. Tab positions occur every *tabsize* characters\n (default is 8, giving tab positions at columns 0, 8, 16 and so on).\n To expand the string, the current column is set to zero and the\n string is examined character by character. If the character is a\n tab ("\\t"), one or more space characters are inserted in the result\n until the current column is equal to the next tab position. (The\n tab character itself is not copied.) If the character is a newline\n ("\\n") or return ("\\r"), it is copied and the current column is\n reset to zero. Any other character is copied unchanged and the\n current column is incremented by one regardless of how the\n character is represented when printed.\n\n >>> \'01\\t012\\t0123\\t01234\'.expandtabs()\n \'01 012 0123 01234\'\n >>> \'01\\t012\\t0123\\t01234\'.expandtabs(4)\n \'01 012 0123 01234\'\n\nstr.find(sub[, start[, end]])\n\n Return the lowest index in the string where substring *sub* is\n found within the slice "s[start:end]". Optional arguments *start*\n and *end* are interpreted as in slice notation. Return "-1" if\n *sub* is not found.\n\n Note: The "find()" method should be used only if you need to know\n the position of *sub*. To check if *sub* is a substring or not,\n use the "in" operator:\n\n >>> \'Py\' in \'Python\'\n True\n\nstr.format(*args, **kwargs)\n\n Perform a string formatting operation. The string on which this\n method is called can contain literal text or replacement fields\n delimited by braces "{}". Each replacement field contains either\n the numeric index of a positional argument, or the name of a\n keyword argument. Returns a copy of the string where each\n replacement field is replaced with the string value of the\n corresponding argument.\n\n >>> "The sum of 1 + 2 is {0}".format(1+2)\n \'The sum of 1 + 2 is 3\'\n\n See Format String Syntax for a description of the various\n formatting options that can be specified in format strings.\n\n This method of string formatting is the new standard in Python 3,\n and should be preferred to the "%" formatting described in String\n Formatting Operations in new code.\n\n New in version 2.6.\n\nstr.index(sub[, start[, end]])\n\n Like "find()", but raise "ValueError" when the substring is not\n found.\n\nstr.isalnum()\n\n Return true if all characters in the string are alphanumeric and\n there is at least one character, false otherwise.\n\n For 8-bit strings, this method is locale-dependent.\n\nstr.isalpha()\n\n Return true if all characters in the string are alphabetic and\n there is at least one character, false otherwise.\n\n For 8-bit strings, this method is locale-dependent.\n\nstr.isdigit()\n\n Return true if all characters in the string are digits and there is\n at least one character, false otherwise.\n\n For 8-bit strings, this method is locale-dependent.\n\nstr.islower()\n\n Return true if all cased characters [4] in the string are lowercase\n and there is at least one cased character, false otherwise.\n\n For 8-bit strings, this method is locale-dependent.\n\nstr.isspace()\n\n Return true if there are only whitespace characters in the string\n and there is at least one character, false otherwise.\n\n For 8-bit strings, this method is locale-dependent.\n\nstr.istitle()\n\n Return true if the string is a titlecased string and there is at\n least one character, for example uppercase characters may only\n follow uncased characters and lowercase characters only cased ones.\n Return false otherwise.\n\n For 8-bit strings, this method is locale-dependent.\n\nstr.isupper()\n\n Return true if all cased characters [4] in the string are uppercase\n and there is at least one cased character, false otherwise.\n\n For 8-bit strings, this method is locale-dependent.\n\nstr.join(iterable)\n\n Return a string which is the concatenation of the strings in the\n *iterable* *iterable*. The separator between elements is the\n string providing this method.\n\nstr.ljust(width[, fillchar])\n\n Return the string left justified in a string of length *width*.\n Padding is done using the specified *fillchar* (default is a\n space). The original string is returned if *width* is less than or\n equal to "len(s)".\n\n Changed in version 2.4: Support for the *fillchar* argument.\n\nstr.lower()\n\n Return a copy of the string with all the cased characters [4]\n converted to lowercase.\n\n For 8-bit strings, this method is locale-dependent.\n\nstr.lstrip([chars])\n\n Return a copy of the string with leading characters removed. The\n *chars* argument is a string specifying the set of characters to be\n removed. If omitted or "None", the *chars* argument defaults to\n removing whitespace. The *chars* argument is not a prefix; rather,\n all combinations of its values are stripped:\n\n >>> \' spacious \'.lstrip()\n \'spacious \'\n >>> \'www.example.com\'.lstrip(\'cmowz.\')\n \'example.com\'\n\n Changed in version 2.2.2: Support for the *chars* argument.\n\nstr.partition(sep)\n\n Split the string at the first occurrence of *sep*, and return a\n 3-tuple containing the part before the separator, the separator\n itself, and the part after the separator. If the separator is not\n found, return a 3-tuple containing the string itself, followed by\n two empty strings.\n\n New in version 2.5.\n\nstr.replace(old, new[, count])\n\n Return a copy of the string with all occurrences of substring *old*\n replaced by *new*. If the optional argument *count* is given, only\n the first *count* occurrences are replaced.\n\nstr.rfind(sub[, start[, end]])\n\n Return the highest index in the string where substring *sub* i namespace
76 'typesseq': u'\\nSequence Types --- "str", "unicode", "list", "tuple", "bytearray", "buffer", "xrange"\\n*************************************************************************************\\n\\nThere are seven sequence types: strings, Unicode strings, lists,\\ntuples, bytearrays, buffers, and xrange objects.\\n\\nFor other containers see the built in "dict" and "set" classes, and\\nthe "collections" module.\\n\\nString literals are written in single or double quotes: "\\'xyzzy\\'",\\n""frobozz"". See String literals for more about string literals.\\nUnicode strings are much like strings, but are specified in the syntax\\nusing a preceding "\\'u\\'" character: "u\\'abc\\'", "u"def"". In addition to\\nthe functionality described here, there are also string-specific\\nmethods described in the String Methods section. Lists are constructed\\nwith square brackets, separating items with commas: "[a, b, c]".\\nTuples are constructed by the comma operator (not within square\\nbrackets), with or without enclosing parentheses, but an empty tuple\\nmust have the enclosing parentheses, such as "a, b, c" or "()". A\\nsingle item tuple must have a trailing comma, such as "(d,)".\\n\\nBytearray objects are created with the built-in function\\n"bytearray()".\\n\\nBuffer objects are not directly supported by Python syntax, but can be\\ncreated by calling the built-in function "buffer()". They don\\'t\\nsupport concatenation or repetition.\\n\\nObjects of type xrange are similar to buffers in that there is no\\nspecific syntax to create them, but they are created using the\\n"xrange()" function. They don\\'t support slicing, concatenation or\\nrepetition, and using "in", "not in", "min()" or "max()" on them is\\ninefficient.\\n\\nMost sequence types support the following operations. The "in" and\\n"not in" operations have the same priorities as the comparison\\noperations. The "+" and "*" operations have the same priority as the\\ncorresponding numeric operations. [3] Additional methods are provided\\nfor Mutable Sequence Types.\\n\\nThis table lists the sequence operations sorted in ascending priority.\\nIn the table, *s* and *t* are sequences of the same type; *n*, *i* and\\n*j* are integers:\\n\\n+--------------------+----------------------------------+------------+\\n| Operation | Result | Notes |\\n+====================+==================================+============+\\n| "x in s" | "True" if an item of *s* is | (1) |\\n| | equal to *x*, else "False" | |\\n+--------------------+----------------------------------+------------+\\n| "x not in s" | "False" if an item of *s* is | (1) |\\n| | equal to *x*, else "True" | |\\n+--------------------+----------------------------------+------------+\\n| "s + t" | the concatenation of *s* and *t* | (6) |\\n+--------------------+----------------------------------+------------+\\n| "s * n, n * s" | equivalent to adding *s* to | (2) |\\n| | itself *n* times | |\\n+--------------------+----------------------------------+------------+\\n| "s[i]" | *i*th item of *s*, origin 0 | (3) |\\n+--------------------+----------------------------------+------------+\\n| "s[i:j]" | slice of *s* from *i* to *j* | (3)(4) |\\n+--------------------+----------------------------------+------------+\\n| "s[i:j:k]" | slice of *s* from *i* to *j* | (3)(5) |\\n| | with step *k* | |\\n+--------------------+----------------------------------+------------+\\n| "len(s)" | length of *s* | |\\n+--------------------+----------------------------------+------------+\\n| "min(s)" | smallest item of *s* | |\\n+--------------------+----------------------------------+------------+\\n| "max(s)" | largest item of *s* | |\\n+--------------------+----------------------------------+------------+\\n| "s.index(x)" | index of the first occurrence of | |\\n| | *x* in *s* | |\\n+--------------------+----------------------------------+------------+\\n| "s.count(x)" | total number of occurrences of | |\\n| | *x* in *s* | |\\n+--------------------+----------------------------------+------------+\\n\\nSequence types also support comparisons. In particular, tuples and\\nlists are compared lexicographically by comparing corresponding\\nelements. This means that to compare equal, every element must compare\\nequal and the two sequences must be of the same type and have the same\\nlength. (For full details see Comparisons in the language reference.)\\n\\nNotes:\\n\\n1. When *s* is a string or Unicode string object the "in" and "not\\n in" operations act like a substring test. In Python versions\\n before 2.3, *x* had to be a string of length 1. In Python 2.3 and\\n beyond, *x* may be a string of any length.\\n\\n2. Values of *n* less than "0" are treated as "0" (which yields an\\n empty sequence of the same type as *s*). Note that items in the\\n sequence *s* are not copied; they are referenced multiple times.\\n This often haunts new Python programmers; consider:\\n\\n >>> lists = [[]] * 3\\n >>> lists\\n [[], [], []]\\n >>> lists[0].append(3)\\n >>> lists\\n [[3], [3], [3]]\\n\\n What has happened is that "[[]]" is a one-element list containing\\n an empty list, so all three elements of "[[]] * 3" are references\\n to this single empty list. Modifying any of the elements of\\n "lists" modifies this single list. You can create a list of\\n different lists this way:\\n\\n >>> lists = [[] for i in range(3)]\\n >>> lists[0].append(3)\\n >>> lists[1].append(5)\\n >>> lists[2].append(7)\\n >>> lists\\n [[3], [5], [7]]\\n\\n Further explanation is available in the FAQ entry How do I create a\\n multidimensional list?.\\n\\n3. If *i* or *j* is negative, the index is relative to the end of\\n the string: "len(s) + i" or "len(s) + j" is substituted. But note\\n that "-0" is still "0".\\n\\n4. The slice of *s* from *i* to *j* is defined as the sequence of\\n items with index *k* such that "i <= k < j". If *i* or *j* is\\n greater than "len(s)", use "len(s)". If *i* is omitted or "None",\\n use "0". If *j* is omitted or "None", use "len(s)". If *i* is\\n greater than or equal to *j*, the slice is empty.\\n\\n5. The slice of *s* from *i* to *j* with step *k* is defined as the\\n sequence of items with index "x = i + n*k" such that "0 <= n <\\n (j-i)/k". In other words, the indices are "i", "i+k", "i+2*k",\\n "i+3*k" and so on, stopping when *j* is reached (but never\\n including *j*). If *i* or *j* is greater than "len(s)", use\\n "len(s)". If *i* or *j* are omitted or "None", they become "end"\\n values (which end depends on the sign of *k*). Note, *k* cannot be\\n zero. If *k* is "None", it is treated like "1".\\n\\n6. **CPython implementation detail:** If *s* and *t* are both\\n strings, some Python implementations such as CPython can usually\\n perform an in-place optimization for assignments of the form "s = s\\n + t" or "s += t". When applicable, this optimization makes\\n quadratic run-time much less likely. This optimization is both\\n version and implementation dependent. For performance sensitive\\n code, it is preferable to use the "str.join()" method which assures\\n consistent linear concatenation performance across versions and\\n implementations.\\n\\n Changed in version 2.4: Formerly, string concatenation never\\n occurred in-place.\\n\\n\\nString Methods\\n==============\\n\\nBelow are listed the string methods which both 8-bit strings and\\nUnicode objects support. Some of them are also available on\\n"bytearray" objects.\\n\\nIn addition, Python\\'s strings support the sequence type methods\\ndescribed in the Sequence Types --- str, unicode, list, tuple,\\nbytearray, buffer, xrange section. To output formatted strings use\\ntemplate strings or the "%" operator described in the String\\nFormatting Operations section. Also, see the "re" module for string\\nfunctions based on regular expressions.\\n\\nstr.capitalize()\\n\\n Return a copy of the string with its first character capitalized\\n and the rest lowercased.\\n\\n For 8-bit strings, this method is locale-dependent.\\n\\nstr.center(width[, fillchar])\\n\\n Return centered in a string of length *width*. Padding is done\\n using the specified *fillchar* (default is a space).\\n\\n Changed in version 2.4: Support for the *fillchar* argument.\\n\\nstr.count(sub[, start[, end]])\\n\\n Return the number of non-overlapping occurrences of substring *sub*\\n in the range [*start*, *end*]. Optional arguments *start* and\\n *end* are interpreted as in slice notation.\\n\\nstr.decode([encoding[, errors]])\\n\\n Decodes the string using the codec registered for *encoding*.\\n *encoding* defaults to the default string encoding. *errors* may\\n be given to set a different error handling scheme. The default is\\n "\\'strict\\'", meaning that encoding errors raise "UnicodeError".\\n Other possible values are "\\'ignore\\'", "\\'replace\\'" and any other\\n name registered via "codecs.register_error()", see section Codec\\n Base Classes.\\n\\n New in version 2.2.\\n\\n Changed in version 2.3: Support for other error handling schemes\\n added.\\n\\n Changed in version 2.7: Support for keyword arguments added.\\n\\nstr.encode([encoding[, errors]])\\n\\n Return an encoded version of the string. Default encoding is the\\n current default string encoding. *errors* may be given to set a\\n different error handling scheme. The default for *errors* is\\n "\\'strict\\'", meaning that encoding errors raise a "UnicodeError".\\n Other possible values are "\\'ignore\\'", "\\'replace\\'",\\n "\\'xmlcharrefreplace\\'", "\\'backslashreplace\\'" and any other name\\n registered via "codecs.register_error()", see section Codec Base\\n Classes. For a list of possible encodings, see section Standard\\n Encodings.\\n\\n New in version 2.0.\\n\\n Changed in version 2.3: Support for "\\'xmlcharrefreplace\\'" and\\n "\\'backslashreplace\\'" and other error handling schemes added.\\n\\n Changed in version 2.7: Support for keyword arguments added.\\n\\nstr.endswith(suffix[, start[, end]])\\n\\n Return "True" if the string ends with the specified *suffix*,\\n otherwise return "False". *suffix* can also be a tuple of suffixes\\n to look for. With optional *start*, test beginning at that\\n position. With optional *end*, stop comparing at that position.\\n\\n Changed in version 2.5: Accept tuples as *suffix*.\\n\\nstr.expandtabs([tabsize])\\n\\n Return a copy of the string where all tab characters are replaced\\n by one or more spaces, depending on the current column and the\\n given tab size. Tab positions occur every *tabsize* characters\\n (default is 8, giving tab positions at columns 0, 8, 16 and so on).\\n To expand the string, the current column is set to zero and the\\n string is examined character by character. If the character is a\\n tab ("\\\\t"), one or more space characters are inserted in the result\\n until the current column is equal to the next tab position. (The\\n tab character itself is not copied.) If the character is a newline\\n ("\\\\n") or return ("\\\\r"), it is copied and the current column is\\n reset to zero. Any other character is copied unchanged and the\\n current column is incremented by one regardless of how the\\n character is represented when printed.\\n\\n >>> \\'01\\\\t012\\\\t0123\\\\t01234\\'.expandtabs()\\n \\'01 012 0123 01234\\'\\n >>> \\'01\\\\t012\\\\t0123\\\\t01234\\'.expandtabs(4)\\n \\'01 012 0123 01234\\'\\n\\nstr.find(sub[, start[, end]])\\n\\n Return the lowest index in the string where substring *sub* is\\n found within the slice "s[start:end]". Optional arguments *start*\\n and *end* are interpreted as in slice notation. Return "-1" if\\n *sub* is not found.\\n\\n Note: The "find()" method should be used only if you need to know\\n the position of *sub*. To check if *sub* is a substring or not,\\n use the "in" operator:\\n\\n >>> \\'Py\\' in \\'Python\\'\\n True\\n\\nstr.format(*args, **kwargs)\\n\\n Perform a string formatting operation. The string on which this\\n method is called can contain literal text or replacement fields\\n delimited by braces "{}". Each replacement field contains either\\n the numeric index of a positional argument, or the name of a\\n keyword argument. Returns a copy of the string where each\\n replacement field is replaced with the string value of the\\n corresponding argument.\\n\\n >>> "The sum of 1 + 2 is {0}".format(1+2)\\n \\'The sum of 1 + 2 is 3\\'\\n\\n See Format String Syntax for a description of the various\\n formatting options that can be specified in format strings.\\n\\n This method of string formatting is the new standard in Python 3,\\n and should be preferred to the "%" formatting described in String\\n Formatting Operations in new code.\\n\\n New in version 2.6.\\n\\nstr.index(sub[, start[, end]])\\n\\n Like "find()", but raise "ValueError" when the substring is not\\n found.\\n\\nstr.isalnum()\\n\\n Return true if all characters in the string are alphanumeric and\\n there is at least one character, false otherwise.\\n\\n For 8-bit strings, this method is locale-dependent.\\n\\nstr.isalpha()\\n\\n Return true if all characters in the string are alphabetic and\\n there is at least one character, false otherwise.\\n\\n For 8-bit strings, this method is locale-dependent.\\n\\nstr.isdigit()\\n\\n Return true if all characters in the string are digits and there is\\n at least one character, false otherwise.\\n\\n For 8-bit strings, this method is locale-dependent.\\n\\nstr.islower()\\n\\n Return true if all cased characters [4] in the string are lowercase\\n and there is at least one cased character, false otherwise.\\n\\n For 8-bit strings, this method is locale-dependent.\\n\\nstr.isspace()\\n\\n Return true if there are only whitespace characters in the string\\n and there is at least one character, false otherwise.\\n\\n For 8-bit strings, this method is locale-dependent.\\n\\nstr.istitle()\\n\\n Return true if the string is a titlecased string and there is at\\n least one character, for example uppercase characters may only\\n follow uncased characters and lowercase characters only cased ones.\\n Return false otherwise.\\n\\n For 8-bit strings, this method is locale-dependent.\\n\\nstr.isupper()\\n\\n Return true if all cased characters [4] in the string are uppercase\\n and there is at least one cased character, false otherwise.\\n\\n For 8-bit strings, this method is locale-dependent.\\n\\nstr.join(iterable)\\n\\n Return a string which is the concatenation of the strings in the\\n *iterable* *iterable*. The separator between elements is the\\n string providing this method.\\n\\nstr.ljust(width[, fillchar])\\n\\n Return the string left justified in a string of length *width*.\\n Padding is done using the specified *fillchar* (default is a\\n space). The original string is returned if *width* is less than or\\n equal to "len(s)".\\n\\n Changed in version 2.4: Support for the *fillchar* argument.\\n\\nstr.lower()\\n\\n Return a copy of the string with all the cased characters [4]\\n converted to lowercase.\\n\\n For 8-bit strings, this method is locale-dependent.\\n\\nstr.lstrip([chars])\\n\\n Return a copy of the string with leading characters removed. The\\n *chars* argument is a string specifying the set of characters to be\\n removed. If omitted or "None", the *chars* argument defaults to\\n removing whitespace. The *chars* argument is not a prefix; rather,\\n all combinations of its values are stripped:\\n\\n >>> \\' spacious \\'.lstrip()\\n \\'spacious \\'\\n >>> \\'www.example.com\\'.lstrip(\\'cmowz.\\')\\n \\'example.com\\'\\n\\n Changed in version 2.2.2: Support for the *chars* argument.\\n\\nstr.partition(sep)\\n\\n Split the string at the first occurrence of *sep*, and return a\\n 3-tuple containing the part before the separator, the separator\\n itself, and the part after the separator. If the separator is not\\n found, return a 3-tuple containing the string itself, followed by\\n two empty strings.\\n\\n New in version 2.5.\\n\\nstr.replace(old, new[, count])\\n\\n Return a copy of the string with all occurrences of substring *old*\\n replaced by *new*. If the optional argument *count* is given, only\\n the first *count* occurrences are replaced.\\n\\nstr.rfind(sub[, start[, end]])\\n\\n Return the highest index in the string where substring *sub* is\\n found, such that *sub* is contained within "s[start:end]".\\n Optional arguments *start* and *end* are interpreted as in slice\\n notation. Return "-1" on failure.\\n\\nstr.rindex(sub[, start[, end]])\\n\\n Like "rfind()" but raises "ValueError" when the substring *sub* is\\n not found.\\n\\nstr.rjust(width[, fillchar])\\n\\n Return the string right justified in a string of length *width*.\\n Padding is done using the specified *fillchar* (default is a\\n space). The original string is returned if *width* is less than or\\n equal to "len(s)".\\n\\n Changed in version 2.4: Support for the *fillchar* argument.\\n\\nstr.rpartition(sep)\\n\\n Split the string at the last occurrence of *sep*, and return a\\n 3-tuple containing the part before the separator, the separator\\n itself, and the part after the separator. If the separator is not\\n found, return a 3-tuple containing two empty strings, followed by\\n the string itself.\\n\\n New in version 2.5.\\n\\nstr.rsplit([sep[, maxsplit]])\\n\\n Return a list of the words in the string, using *sep* as the\\n delimiter string. If *maxsplit* is given, at most *maxsplit* splits\\n are done, the *rightmost* ones. If *sep* is not specified or\\n "None", any whitespace string is a separator. Except for splitting\\n from the right, "rsplit()" behaves like "split()" which is\\n described in detail below.\\n\\n New in version 2.4.\\n\\nstr.rstrip([chars])\\n\\n Return a copy of the string with trailing characters removed. The\\n *chars* argument is a string specifying the set of characters to be\\n removed. If omitted or "None", the *chars* argument defaults to\\n removing whitespace. The *chars* argument is not a suffix; rather,\\n all combinations of its values are stripped:\\n\\n >>> \\' spacious \\'.rstrip()\\n \\' spacious\\'\\n >>> \\'mississippi\\'.rstrip(\\'ipz\\')\\n \\'mississ\\'\\n\\n Changed in version 2.2.2: Support for the *chars* argument.\\n\\nstr.split([sep[, maxsplit]])\\n\\n Return a list of the words in the string, using *sep* as the\\n delimiter string. If *maxsplit* is given, at most *maxsplit*\\n splits are done (thus, the list will have at most "maxsplit+1"\\n elements). If *maxsplit* is not specified or "-1", then there is\\n no limit on the number of splits (all possible splits are made).\\n\\n If *sep* is given, consecutive delimiters are not grouped together\\n and are deemed to delimit empty strings (for example,\\n "\\'1,,2\\'.split(\\',\\')" returns "[\\'1\\', \\'\\', \\'2\\']"). The *sep* argument\\n may consist of multiple characters (for example,\\n "\\'1<>2<>3\\'.split(\\'<>\\')" returns "[\\'1\\', \\'2\\', \\'3\\']"). Splitting an\\n empty string with a specified separator returns "[\\'\\']".\\n\\n If *sep* is not specified or is "None", a different splitting\\n algorithm is applied: runs of consecutive whitespace are regarded\\n as a single separator, and the result will contain no empty strings\\n at the start or end if the string has leading or trailing\\n whitespace. Consequently, splitting an empty string or a string\\n consisting of just whitespace with a "None" separator returns "[]".\\n\\n For example, "\\' 1 2 3 \\'.split()" returns "[\\'1\\', \\'2\\', \\'3\\']", and\\n "\\' 1 2 3 \\'.split(None, 1)" returns "[\\'1\\', \\'2 3 \\']".\\n\\nstr.splitlines([keepends])\\n\\n Return a list of the lines in the string, breaking at line\\n boundaries. This method uses the *universal newlines* approach to\\n splitting lines. Line breaks are not included in the resulting list\\n unless *keepends* is given and true.\\n\\n Python recognizes ""\\\\r"", ""\\\\n"", and ""\\\\r\\\\n"" as line boundaries\\n for 8-bit strings.\\n\\n For example:\\n\\n >>> \\'ab c\\\\n\\\\nde fg\\\\rkl\\\\r\\\\n\\'.splitlines()\\n [\\'ab c\\', \\'\\', \\'de fg\\', \\'kl\\']\\n >>> \\'ab c\\\\n\\\\nde fg\\\\rkl\\\\r\\\\n\\'.splitlines(True)\\n [\\'ab c\\\\n\\', \\'\\\\n\\', \\'de fg\\\\r\\', \\'kl\\\\r\\\\n\\']\\n\\n Unlike "split()" when a delimiter string *sep* is given, this\\n method returns an empty list for the empty string, and a terminal\\n line break does not result in an extra line:\\n\\n >>> "".splitlines()\\n []\\n >>> "One line\\\\n".splitlines()\\n [\\'One line\\']\\n\\n For comparison, "split(\\'\\\\n\\')" gives:\\n\\n >>> \\'\\'.split(\\'\\\\n\\')\\n [\\'\\']\\n >>> \\'Two lines\\\\n\\'.split(\\'\\\\n\\')\\n [\\'Two lines\\', \\'\\']\\n\\nunicode.splitlines([keepends])\\n\\n Return a list of the lines in the string, like "str.splitlines()".\\n However, the Unicode method splits on the following line\\n boundaries, which are a superset of the *universal newlines*\\n recognized for 8-bit strings.\\n\\n +-------------------------+-------------------------------+\\n | Representation | Description |\\n +=========================+===============================+\\n | "\\\\n" | Line Feed |\\n +-------------------------+-------------------------------+\\n | "\\\\r" | Carriage Return |\\n +-------------------------+-------------------------------+\\n | "\\\\r\\\\n" | Carriage Return + Line Feed |\\n +-------------------------+-------------------------------+\\n | "\\\\v" or "\\\\x0b" | Line Tabulation |\\n +-------------------------+-------------------------------+\\n | "\\\\f" or "\\\\x0c" | Form Feed |\\n +-------------------------+-------------------------------+\\n | "\\\\x1c" | File Separator |\\n +-------------------------+-------------------------------+\\n | "\\\\x1d" | Group Separator |\\n +-------------------------+-------------------------------+\\n | "\\\\x1e" | Record Separator |\\n +-------------------------+-------------------------------+\\n | "\\\\x85" | Next Line (C1 Control Code) |\\n +-------------------------+-------------------------------+\\n | "\\\\u2028" | Line Separator |\\n +-------------------------+-------------------------------+\\n | "\\\\u2029" | Paragraph Separator |\\n +-------------------------+-------------------------------+\\n\\n Changed in version 2.7: "\\\\v" and "\\\\f" added to list of line\\n boundaries.\\n\\nstr.startswith(prefix[, start[, end]])\\n\\n Return "True" if string starts with the *prefix*, otherwise return\\n "False". *prefix* can also be a tuple of prefixes to look for.\\n With optional *start*, test string beginning at that position.\\n With optional *end*, stop comparing string at that position.\\n\\n Changed in version 2.5: Accept tuples as *prefix*.\\n\\nstr.strip([chars])\\n\\n Return a copy of the string with the leading and trailing\\n characters removed. The *chars* argument is a string specifying the\\n set of characters to be removed. If omitted or "None", the *chars*\\n argument defaults to removing whitespace. The *chars* argument is\\n not a prefix or suffix; rather, all combinations of its values are\\n stripped:\\n\\n >>> \\' spacious \\'.strip()\\n \\'spacious\\'\\n >>> \\'www.example.com\\'.strip(\\'cmowz.\\')\\n \\'example\\'\\n\\n Changed in version 2.2.2: Support for the *chars* argument.\\n\\nstr.swapcase()\\n\\n Return a copy of the string with uppercase characters converted to\\n lowercase and vice versa.\\n\\n For 8-bit strings, this method is locale-dependent.\\n\\nstr.title()\\n\\n Return a titlecased version of the string where words start with an\\n uppercase character and the remaining characters are lowercase.\\n\\n The algorithm uses a simple language-independent definition of a\\n word as groups of consecutive letters. The definition works in\\n many contexts but it means that apostrophes in contractions and\\n possessives form word boundaries, which may not be the desired\\n result:\\n\\n >>> "they\\'re bill\\'s friends from the UK".title()\\n "They\\'Re Bill\\'S Friends From The Uk"\\n\\n A workaround for apostrophes can be constructed using regular\\n expressions:\\n\\n >>> import re\\n >>> def titlecase(s):\\n ... return re.sub(r"[A-Za-z]+(\\'[A-Za-z]+)?",\\n ... lambda mo: mo.group(0)[0].upper() +\\n ... mo.group(0)[1:].lower(),\\n ... s)\\n ...\\n >>> titlecase("they\\'re bill\\'s friends.")\\n "They\\'re Bill\\'s Friends."\\n\\n For 8-bit strings, this method is locale-dependent.\\n\\nstr.translate(table[, deletechars])\\n\\n Return a copy of the string where all characters occurring in the\\n optional argument *deletechars* are removed, and the remaining\\n characters have been mapped through the given translation table,\\n which must be a string of length 256.\\n\\n You can use the "maketrans()" helper function in the "string"\\n module to create a translation table. For string objects, set the\\n *table* argument to "None" for translations that only delete\\n characters:\\n\\n >>> \\'read this short text\\'.translate(None, \\'aeiou\\')\\n \\'rd ths shrt txt\\'\\n\\n New in version 2.6: Support for a "None" *table* argument.\\n\\n For Unicode objects, the "translate()" method does not accept the\\n optional *deletechars* argument. Instead, it returns a copy of the\\n *s* where all characters have been mapped through the given\\n translation table which must be a mapping of Unicode ordinals to\\n Unicode ordinals, Unicode strings or "None". Unmapped characters\\n are left untouched. Characters mapped to "None" are deleted. Note,\\n a more flexible approach is to create a custom character mapping\\n codec using the "codecs" module (see "encodings.cp1251" for an\\n example).\\n\\nstr.upper()\\n\\n Return a copy of the string with all the cased characters [4]\\n converted to uppercase. Note that "str.upper().isupper()" might be\\n "False" if "s" contains uncased characters or if the Unicode\\n category of the resulting character(s) is not "Lu" (Letter,\\n uppercase), but e.g. "Lt" (Letter, titlecase).\\n\\n For 8-bit strings, this method is locale-dependent.\\n\\nstr.zfill(width)\\n\\n Return the numeric string left filled with zeros in a string of\\n length *width*. A sign prefix is handled correctly. The original\\n string is returned if *width* is less than or equal to "len(s)".\\n\\n New in version 2.2.2.\\n\\nThe following methods are present only on unicode objects:\\n\\nunicode.isnumeric()\\n\\n Return "True" if there are only numeric characters in S, "False"\\n otherwise. Numeric characters include digit characters, and all\\n characters that have the Unicode numeric value property, e.g.\\n U+2155, VULGAR FRACTION ONE FIFTH.\\n\\nunicode.isdecimal()\\n\\n Return "True" if there are only decimal characters in S, "False"\\n otherwise. Decimal characters include digit characters, and all\\n characters that can be used to form decimal-radix numbers, e.g.\\n U+0660, ARABIC-INDIC DIGIT ZERO.\\n\\n\\nString Formatting Operations\\n============================\\n\\nString and Unicode objects have one unique built-in operation: the "%"\\noperator (modulo). This is also known as the string *formatting* or\\n*interpolation* operator. Given "format % values" (where *format* is\\na string or Unicode object), "%" conversion specifications in *format*\\nare replaced with zero or more elements of *values*. The effect is\\nsimilar to the using "sprintf()" in the C language. If *format* is a\\nUnicode object, or if any of the objects being converted using the\\n"%s" conversion are Unicode objects, the result will also be a Unicode\\nobject.\\n\\nIf *format* requires a single argument, *values* may be a single non-\\ntuple object. [5] Otherwise, *values* must be a tuple with exactly\\nthe number of items specified by the format string, or a single\\nmapping object (for example, a dictionary).\\n\\nA conversion specifier contains two or more characters and has the\\nfollowing components, which must occur in this order:\\n\\n1. The "\\'%\\'" character, which marks the start of the specifier.\\n\\n2. Mapping key (optional), consisting of a parenthesised sequence\\n of characters (for example, "(somename)").\\n\\n3. Conversion flags (optional), which affect the result of some\\n conversion types.\\n\\n4. Minimum field width (optional). If specified as an "\\'*\\'"\\n (asterisk), the actual width is read from the next element of the\\n tuple in *values*, and the object to convert comes after the\\n minimum field width and optional precision.\\n\\n5. Precision (optional), given as a "\\'.\\'" (dot) followed by the\\n precision. If specified as "\\'*\\'" (an asterisk), the actual width\\n is read from the next element of the tuple in *values*, and the\\n value to convert comes after the precision.\\n\\n6. Length modifier (optional).\\n\\n7. Conversion type.\\n\\nWhen the right argument is a dictionary (or other mapping type), then\\nthe formats in the string *must* include a parenthesised mapping key\\ninto that dictionary inserted immediately after the "\\'%\\'" character.\\nThe mapping key selects the value to be formatted from the mapping.\\nFor example:\\n\\n>>> print \\'%(language)s has %(number)03d quote types.\\' % \\\\\\n... {"language": "Python", "number": 2}\\nPython has 002 quote types.\\n\\nIn this case no "*" specifiers may occur in a format (since they\\nrequire a sequential parameter list).\\n\\nThe conversion flag characters are:\\n\\n+-----------+-----------------------------------------------------------------------+\\n| Flag | Meaning |\\n+===========+=======================================================================+\\n| "\\'#\\'" | The value conversion will use the "alternate form" (where defined |\\n| | below). |\\n+-----------+-----------------------------------------------------------------------+\\n| "\\'0\\'" | The conversion will be zero padded for numeric values. |\\n+-----------+-----------------------------------------------------------------------+\\n| "\\'-\\'" | The converted value is left adjusted (overrides the "\\'0\\'" conversion |\\n| | if both are given). |\\n+-----------+-----------------------------------------------------------------------+\\n| "\\' \\'" | (a space) A blank should be left before a positive number (or empty |\\n| | string) produced by a signed conversion. |\\n+-----------+-----------------------------------------------------------------------+\\n| "\\'+\\'" | A sign character ("\\'+\\'" or "\\'-\\'") will precede the conversion |\\n| | (overrides a "space" flag). |\\n+-----------+-----------------------------------------------------------------------+\\n\\nA length modifier ("h", "l", or "L") may be present, but is ignored as\\nit is not necessary for Python -- so e.g. "%ld" is identical to "%d".\\n\\nThe conversion types are:\\n\\n+--------------+-------------------------------------------------------+---------+\\n| Conversion | Meaning | Notes |\\n+==============+=======================================================+=========+\\n| "\\'d\\'" | Signed integer decimal. | |\\n+--------------+-------------------------------------------------------+---------+\\n| "\\'i\\'" | Signed integer decimal. | |\\n+--------------+-------------------------------------------------------+---------+\\n| "\\'o\\'" | Signed octal value. | (1) |\\n+--------------+-------------------------------------------------------+---------+\\n| "\\'u\\'" | Obsolete type -- it is identical to "\\'d\\'". | (7) |\\n+--------------+-------------------------------------------------------+---------+\\n| "\\'x\\'" | Signed hexadecimal (lowercase). | (2) |\\n+--------------+-------------------------------------------------------+---------+\\n| "\\'X\\'" | Signed hexadecimal (uppercase). | (2) |\\n+--------------+-------------------------------------------------------+---------+\\n| "\\'e\\'" | Floating point exponential format (lowercase). | (3) |\\n+--------------+-------------------------------------------------------+---------+\\n| "\\'E\\'" | Floating point exponential format (uppercase). | (3) |\\n+--------------+-------------------------------------------------------+---------+\\n| "\\'f\\'" | Floating point decimal format. | (3) |\\n+--------------+-------------------------------------------------------+---------+\\n| "\\'F\\'" | Floating point decimal format. | (3) |\\n+--------------+-------------------------------------------------------+---------+\\n| "\\'g\\'" | Floating point format. Uses lowercase exponential | (4) |\\n| | format if exponent is less than -4 or not less than | |\\n| | precision, decimal format otherwise. | |\\n+--------------+-------------------------------------------------------+---------+\\n| "\\'G\\'" | Floating point format. Uses uppercase exponential | (4) |\\n| | format if exponent is less than -4 or not less than | |\\n| | precision, decimal format otherwise. | |\\n+--------------+-------------------------------------------------------+---------+\\n| "\\'c\\'" | Single character (accepts integer or single character | |\\n| | string). | |\\n+--------------+-------------------------------------------------------+---------+\\n| "\\'r\\'" | String (converts any Python object using repr()). | (5) |\\n+--------------+-------------------------------------------------------+---------+\\n| "\\'s\\'" | String (converts any Python object using "str()"). | (6) |\\n+--------------+-------------------------------------------------------+---------+\\n| "\\'%\\'" | No argument is converted, results in a "\\'%\\'" | |\\n| | character in the result. | |\\n+--------------+-------------------------------------------------------+---------+\\n\\nNotes:\\n\\n1. The alternate form causes a leading zero ("\\'0\\'") to be inserted\\n between left-hand padding and the formatting of the number if the\\n leading character of the result is not already a zero.\\n\\n2. The alternate form causes a leading "\\'0x\\'" or "\\'0X\\'" (depending\\n on whether the "\\'x\\'" or "\\'X\\'" format was used) to be inserted\\n between left-hand padding and the formatting of the number if the\\n leading character of the result is not already a zero.\\n\\n3. The alternate form causes the result to always contain a decimal\\n point, even if no digits follow it.\\n\\n The precision determines the number of digits after the decimal\\n point and defaults to 6.\\n\\n4. The alternate form causes the result to always contain a decimal\\n point, and trailing zeroes are not removed as they would otherwise\\n be.\\n\\n The precision determines the number of significant digits before\\n and after the decimal point and defaults to 6.\\n\\n5. The "%r" conversion was added in Python 2.0.\\n\\n The precision determines the maximal number of characters used.\\n\\n6. If the object or format provided is a "unicode" string, the\\n resulting string will also be "unicode".\\n\\n The precision determines the maximal number of characters used.\\n\\n7. See **PEP 237**.\\n\\nSince Python strings have an explicit length, "%s" conversions do not\\nassume that "\\'\\\\0\\'" is the end of the string.\\n\\nChanged in version 2.7: "%f" conversions for numbers whose absolute\\nvalue is over 1e50 are no longer replaced by "%g" conversions.\\n\\nAdditional string operations are defined in standard modules "string"\\nand "re".\\n\\n\\nXRange Type\\n===========\\n\\nThe "xrange" type is an immutable sequence which is commonly used for\\nlooping. The advantage of the "xrange" type is that an "xrange"\\nobject will always take the same amount of memory, no matter the size\\nof the range it represents. There are no consistent performance\\nadvantages.\\n\\nXRange objects have very little behavior: they only support indexing,\\niteration, and the "len()" function.\\n\\n\\nMutable Sequence Types\\n======================\\n\\nList and "bytearray" objects support additional operations that allow\\nin-place modification of the object. Other mutable sequence types\\n(when added to the language) should also support these operations.\\nStrings and tuples are immutable sequence types: such objects cannot\\nbe modified once created. The following operations are defined on\\nmutable sequence types (where *x* is an arbitrary object):\\n\\n+--------------------------------+----------------------------------+-----------------------+\\n| Operation | Result | Notes |\\n+================================+==================================+=======================+\\n| "s[i] = x" | item *i* of *s* is replaced by | |\\n| | *x* | |\\n+--------------------------------+----------------------------------+-----------------------+\\n| "s[i:j] = t" | slice of *s* from *i* to *j* is | |\\n| | replaced by the contents of the | |\\n| | iterable *t* | |\\n+--------------------------------+----------------------------------+-----------------------+\\n| "del s[i:j]" | same as "s[i:j] = []" | |\\n+--------------------------------+----------------------------------+-----------------------+\\n| "s[i:j:k] = t" | the elements of "s[i:j:k]" are | (1) |\\n| | replaced by those of *t* | |\\n+--------------------------------+----------------------------------+-----------------------+\\n| "del s[i:j:k]" | removes the elements of | |\\n| | "s[i:j:k]" from the list | |\\n+--------------------------------+----------------------------------+-----------------------+\\n| "s.append(x)" | same as "s[len(s):len(s)] = [x]" | (2) |\\n+--------------------------------+----------------------------------+-----------------------+\\n| "s.extend(t)" or "s += t" | for the most part the same as | (3) |\\n| | "s[len(s):len(s)] = t" | |\\n+--------------------------------+----------------------------------+-----------------------+\\n| "s *= n" | updates *s* with its contents | (11) |\\n| | repeated *n* times | |\\n+--------------------------------+----------------------------------+-----------------------+\\n| "s.count(x)" | return number of *i*\\'s for which | |\\n| | "s[i] == x" | |\\n+--------------------------------+----------------------------------+-----------------------+\\n| "s.index(x[, i[, j]])" | return smallest *k* such that | (4) |\\n| | "s[k] == x" and "i <= k < j" | |\\n+--------------------------------+----------------------------------+-----------------------+\\n| "s.insert(i, x)" | same as "s[i:i] = [x]" | (5) |\\n+--------------------------------+----------------------------------+-----------------------+\\n| "s.pop([i])" | same as "x = s[i]; del s[i]; | (6) |\\n| | return x" | |\\n+--------------------------------+----------------------------------+-----------------------+\\n| "s.remove(x)" | same as "del s[s.index(x)]" | (4) |\\n+--------------------------------+----------------------------------+-----------------------+\\n| "s.reverse()" | reverses the items of *s* in | (7) |\\n| | place | |\\n+--------------------------------+----------------------------------+-----------------------+\\n| "s.sort([cmp[, key[, | sort the items of *s* in place | (7)(8)(9)(10) |\\n| reverse]]])" | | |\\n+--------------------------------+----------------------------------+-----------------------+\\n\\nNotes:\\n\\n1. *t* must have the same length as the slice it is replacing.\\n\\n2. The C implementation of Python has historically accepted\\n multiple parameters and implicitly joined them into a tuple; this\\n no longer works in Python 2.0. Use of this misfeature has been\\n deprecated since Python 1.4.\\n\\n3. *t* can be any iterable object.\\n\\n4. Raises "ValueError" when *x* is not found in *s*. When a\\n negative index is passed as the second or third parameter to the\\n "index()" method, the list length is added, as for slice indices.\\n If it is still negative, it is truncated to zero, as for slice\\n indices.\\n\\n Changed in version 2.3: Previously, "index()" didn\\'t have arguments\\n for specifying start and stop positions.\\n\\n5. When a negative index is passed as the first parameter to the\\n "insert()" method, the list length is added, as for slice indices.\\n If it is still negative, it is truncated to zero, as for slice\\n indices.\\n\\n Changed in version 2.3: Previously, all negative indices were\\n truncated to zero.\\n\\n6. The "pop()" method\\'s optional argument *i* defaults to "-1", so\\n that by default the last item is removed and returned.\\n\\n7. The "sort()" and "reverse()" methods modify the list in place\\n for economy of space when sorting or reversing a large list. To\\n remind you that they operate by side effect, they don\\'t return the\\n sorted or reversed list.\\n\\n8. The "sort()" method takes optional arguments for controlling the\\n comparisons.\\n\\n *cmp* specifies a custom comparison function of two arguments (list\\n items) which should return a negative, zero or positive number\\n depending on whether the first argument is considered smaller than,\\n equal to, or larger than the second argument: "cmp=lambda x,y:\\n cmp(x.lower(), y.lower())". The default value is "None".\\n\\n *key* specifies a function of one argument that is used to extract\\n a comparison key from each list element: "key=str.lower". The\\n default value is "None".\\n\\n *reverse* is a boolean value. If set to "True", then the list\\n elements are sorted as if each comparison were reversed.\\n\\n In general, the *key* and *reverse* conversion processes are much\\n faster than specifying an equivalent *cmp* function. This is\\n because *cmp* is called multiple times for each list element while\\n *key* and *reverse* touch each element only once. Use\\n "functools.cmp_to_key()" to convert an old-style *cmp* function to\\n a *key* function.\\n\\n Changed in version 2.3: Support for "None" as an equivalent to\\n omitting *cmp* was added.\\n\\n Changed in version 2.4: Support for *key* and *reverse* was added.\\n\\n9. Starting with Python 2.3, the "sort()" method is guaranteed to\\n be stable. A sort is stable if it guarantees not to change the\\n relative order of elements that compare equal --- this is helpful\\n for sorting in multiple passes (for example, sort by department,\\n then by salary grade).\\n\\n10. **CPython implementation detail:** While a list is being\\n sorted, the effect of attempting to mutate, or even inspect, the\\n list is undefined. The C implementation of Python 2.3 and newer\\n makes the list appear empty for the duration, and raises\\n "ValueError" if it can detect that the list has been mutated\\n during a sort.\\n\\n11. The value *n* is an integer, or an object implementing\\n "__index__()". Zero and negative values of *n* clear the\\n sequence. Items in the sequence are not copied; they are\\n referenced multiple times, as explained for "s * n" under Sequence\\n Types --- str, unicode, list, tuple, bytearray, buffer, xrange.\\n', namespace
[all...]
/external/python/cpython3/Lib/test/
H A Dtest_inspect.py1492 class sub(meta): class in function:TestGetattrStatic.test_metaclass
1494 class OtherThing(object, metaclass=sub):
1902 # Test that basic sub-classing works
/external/python/cpython3/Python/
H A Dceval.c1462 PyObject *sub = POP(); local
1464 PyObject *res = PyObject_GetItem(container, sub);
1466 Py_DECREF(sub);
1721 PyObject *sub = TOP(); local
1726 /* container[sub] = v */
1727 err = PyObject_SetItem(container, sub, v);
1730 Py_DECREF(sub);
1792 PyObject *sub = TOP(); local
1796 /* del container[sub] */
1797 err = PyObject_DelItem(container, sub);
[all...]
H A Dcompile.c2339 even if hidden in a sub-try or except. */
4784 slice_ty sub = (slice_ty)asdl_seq_GET( local
4786 if (!compiler_visit_nested_slice(c, sub, ctx))
/external/selinux/libsepol/src/
H A Dmodule_to_cil.c3607 static int is_scope_superset(struct scope_index *sup, struct scope_index *sub) argument
3609 // returns 1 if sup is a superset of sub, returns 0 otherwise
3622 sub_map = sub->scope[i];
3631 if (sup->class_perms_len < sub->class_perms_len) {
3635 for (i = 0; i < sub->class_perms_len; i++) {
3637 sub_map = sub->class_perms_map[i];
/external/v8/src/arm64/
H A Dassembler-arm64.cc1114 void Assembler::sub(const Register& rd, function in class:v8::internal::Assembler
1136 sub(rd, zr, operand);
2266 // add/sub wsp, <Wn>, <Wm> [, LSL #0-3 ]
2267 // add/sub <Wd>, wsp, <Wm> [, LSL #0-3 ]
2268 // add/sub wsp, wsp, <Wm> [, LSL #0-3 ]
2271 // extended register mode, and emit an add/sub extended instruction.

Completed in 884 milliseconds

1234567891011>>