Searched defs:definition (Results 1 - 25 of 42) sorted by relevance

12

/external/snakeyaml/src/main/java/org/yaml/snakeyaml/constructor/
H A DConstructor.java96 * or for a definition from a Spring ApplicationContext.
119 * assigned in constructor then the 'root' property of this definition is
122 * @param definition
124 * @return the previous value associated with <tt>definition</tt>, or
125 * <tt>null</tt> if there was no mapping for <tt>definition</tt>.
127 public TypeDescription addTypeDescription(TypeDescription definition) { argument
128 if (definition == null) {
131 Tag tag = definition.getTag();
132 typeTags.put(tag, definition.getType());
133 return typeDefinitions.put(definition
[all...]
/external/tensorflow/tensorflow/core/profiler/internal/
H A Dtfprof_show.cc218 string definition = FormatNumber(node->proto().total_definition_count()); local
220 definition = "1/" + definition;
222 definition = "--/" + definition;
224 info.push_back(run + "|" + definition);
/external/clang/test/CodeGenCXX/
H A Dmangle-template.cpp132 struct definition { struct in struct:test10::X
138 typename X<T>::template definition<U> f(T, U) { }
H A Dvisibility.cpp29 struct definition { struct in struct:test25::X
35 X<int>::definition<A> a;
740 // definition. It's not really clear what we can do here, because we
741 // produce the symbols before even seeing the DEFAULT definition of zed.
/external/swiftshader/src/Reactor/
H A DOptimizer.cpp66 std::unordered_map<Ice::Variable*, Ice::Inst*> definition; member in class:__anon22337::Optimizer
364 definition.clear();
376 definition[instruction.getDest()] = &instruction;
455 deleteInstruction(definition[var]);
474 Ice::Inst *def = definition[address];
/external/swiftshader/third_party/LLVM/tools/gold/
H A Dgold-plugin.cpp317 int definition = attrs & LTO_SYMBOL_DEFINITION_MASK; local
319 switch (definition) {
337 (*message)(LDPL_ERROR, "Unknown definition attribute: %d", definition);
/external/tensorflow/tensorflow/python/framework/
H A Dfunction.py63 default graph and adds the definition of the function into the
179 # its definition needs to be deferred until it's called.
191 """_DefinedFunction encapsulates a function definition and its properties.
195 definition: The definition of this function. A FunctionDef proto.
235 ValueError: The function definition is invalid.
273 def definition(self): member in class:_DefinedFunction
274 """Function definition proto."""
319 """Creates the function definition if it's not created yet."""
381 # Hash the definition an
[all...]
/external/deqp/scripts/khr_util/
H A Dregistry.py54 definition=None variable in class:Type
292 definition=''.join(eType.xpath('.//text()')),
/external/desugar/java/com/google/devtools/common/options/
H A DOptionsParser.java243 OptionDescription(OptionDefinition definition, OptionsData optionsData) { argument
244 this.optionDefinition = definition;
/external/icu/android_icu4j/src/main/tests/android/icu/dev/test/rbbi/
H A DRBBIMonkeyTest.java49 String fOriginalDef; // set definition as it appeared in user supplied rules.
50 String fExpandedDef; // set definition with any embedded named sets replaced by their defs, recursively.
104 // Match (initial parse) of a character class definition line.
118 "(.*?)" + // The rule definition
131 * Create the expanded definition for this char class,
132 * replacing any set references with the corresponding definition.
134 CharClass addCharClass(String name, String definition) { argument
136 fSetRefsMatcher.reset(definition);
150 System.out.printf(" %s\n", definition);
154 // Verify that the expanded set definition i
190 addRule(String name, String definition) argument
[all...]
/external/icu/icu4j/main/tests/core/src/com/ibm/icu/dev/test/rbbi/
H A DRBBIMonkeyTest.java46 String fOriginalDef; // set definition as it appeared in user supplied rules.
47 String fExpandedDef; // set definition with any embedded named sets replaced by their defs, recursively.
101 // Match (initial parse) of a character class definition line.
115 "(.*?)" + // The rule definition
128 * Create the expanded definition for this char class,
129 * replacing any set references with the corresponding definition.
131 CharClass addCharClass(String name, String definition) { argument
133 fSetRefsMatcher.reset(definition);
147 System.out.printf(" %s\n", definition);
151 // Verify that the expanded set definition i
187 addRule(String name, String definition) argument
[all...]
/external/clang/tools/libclang/
H A DCXCursor.cpp1360 const MacroDefinitionRecord *definition = getCursorMacroDefinition(cursor); local
1361 const IdentifierInfo *MacroInfo = definition->getName();
/external/icu/icu4c/source/i18n/
H A Ducol_sit.cpp338 const char *definition = string; local
347 parseError->offset = (int32_t)(string - definition);
430 ucol_prepareShortStringOpen( const char *definition, argument
455 ucol_sit_readSpecs(&s, definition, parseError, status);
497 ucol_openFromShortString( const char *definition, argument
503 UTRACE_DATA1(UTRACE_INFO, "short string = \"%s\"", definition);
523 const char *string = definition;
526 string = ucol_sit_readSpecs(&s, definition, parseError, status);
543 parseError->offset = (int32_t)(string - definition);
585 ucol_normalizeShortDefinitionString(const char *definition, argument
[all...]
/external/icu/icu4c/source/test/intltest/
H A Drbbimonkeytest.cpp89 // Match (initial parse) of a character class definition line.
103 "(?<RuleDef>.*?)" // The rule definition
113 CharClass *BreakRules::addCharClass(const UnicodeString &name, const UnicodeString &definition, UErrorCode &status) { argument
115 // Create the expanded definition for this char class,
116 // replacing any set references with the corresponding definition.
120 fSetRefsMatcher->reset(definition);
132 // Verify that the expanded set definition is valid.
144 CharClass *cclass = new CharClass(name, definition, expandedDef, s);
161 void BreakRules::addRule(const UnicodeString &name, const UnicodeString &definition, UErrorCode &status) { argument
164 thisRule->fRule = definition;
[all...]
/external/skia/tools/bookmaker/
H A Dbookmaker.cpp65 Definition* definition = nullptr; local
91 definition = fRoot;
101 definition = fParent;
115 definition = fRoot;
117 definition = &fRoot->fLeaves[name];
124 for (auto child : definition->fChildren) {
144 if (fCheckMethods && !definition->checkMethod()) {
149 if (!this->checkEndMarker(markType, definition->fName)) {
153 if (!this->popParentStack(definition)) {
157 definition
694 RootDefinition* definition = &fExternals.front(); local
1319 popParentStack(Definition* definition) argument
1341 TextParser(const Definition* definition) argument
[all...]
H A DmdOut.cpp518 if (const Definition* definition = fRoot->find(ref, RootDefinition::AllowParens::kYes)) {
519 return definition;
531 const Definition* definition = leaf.second->find(ref, local
533 if (definition) {
534 return definition;
539 if (const Definition* definition = root->find(prefixed,
541 return definition;
619 if (const Definition* definition = classIter->second.find(ref,
621 return definition;
626 if (const Definition* definition
[all...]
/external/skqp/tools/bookmaker/
H A Dbookmaker.cpp64 Definition* definition = nullptr; local
90 definition = fRoot;
100 definition = fParent;
114 definition = fRoot;
116 definition = &fRoot->fLeaves[name];
123 for (auto child : definition->fChildren) {
143 if (fCheckMethods && !definition->checkMethod()) {
147 if (!this->popParentStack(definition)) {
151 definition->fStart = defStart;
153 definition
596 RootDefinition* definition = &fExternals.front(); local
1226 popParentStack(Definition* definition) argument
1248 TextParser(const Definition* definition) argument
[all...]
H A DmdOut.cpp513 if (const Definition* definition = fRoot->find(ref, RootDefinition::AllowParens::kYes)) {
514 return definition;
526 const Definition* definition = leaf.second->find(ref, local
528 if (definition) {
529 return definition;
534 if (const Definition* definition = root->find(prefixed,
536 return definition;
613 if (const Definition* definition = classIter->second.find(ref,
615 return definition;
620 if (const Definition* definition
[all...]
/external/flatbuffers/src/
H A Didl_parser.cpp677 return Error("native_custom_alloc can only be used with a table or struct definition");
1340 bool create_if_new, bool definition) {
1345 if (definition) {
1356 if (definition) {
1362 if (!definition) {
1372 if (definition) {
1377 // Not a definition.
1339 LookupCreateStruct(const std::string &name, bool create_if_new, bool definition) argument
/external/clang/include/clang/Analysis/Analyses/
H A DThreadSafetyTIL.h378 /// Return the definition of the variable.
381 SExpr *definition() { return Definition; } function in class:clang::threadSafety::Variable
382 const SExpr *definition() const { return Definition; } function in class:clang::threadSafety::Variable
407 SExpr* Definition; // The TIL type or definition
676 // This is a variable declaration, so traverse the definition.
688 Cmp.compare(VarDecl->definition(), E->VarDecl->definition());
732 // A rewrite must introduce the variable with a null definition, and update
1881 // This is a variable declaration, so traverse the definition.
1893 Cmp.compare(VarDecl->definition(),
[all...]
/external/deqp/modules/gles2/functional/
H A Des2fUniformApiTests.cpp1081 const char* definition; member in struct:deqp::__anon5009
1109 dst << compareFuncs[compFuncNdx].definition << "\n";
/external/deqp/modules/gles31/functional/
H A Des31fProgramUniformTests.cpp1068 const char* definition; member in struct:deqp::gles31::Functional::__anon5393
1119 dst << compareFuncs[compFuncNdx].definition << "\n";
/external/deqp/modules/gles3/functional/
H A Des3fUniformApiTests.cpp1252 const char* definition; member in struct:deqp::__anon5215
1303 dst << compareFuncs[compFuncNdx].definition << "\n";
/external/expat/tests/
H A Druntests.c1991 const char *definition; member in struct:AttTest
2078 for (test = attr_data; test->definition != NULL; test++) {
2085 test->definition,
2086 strlen(test->definition),
5016 /* Test recursive parameter entity definition rejected in external DTD */
/external/python/cpython2/Lib/pydoc_data/
H A Dtopics.py4 'assignment': u'\nAssignment statements\n*********************\n\nAssignment statements are used to (re)bind names to values and to\nmodify attributes or items of mutable objects:\n\n assignment_stmt ::= (target_list "=")+ (expression_list | yield_expression)\n target_list ::= target ("," target)* [","]\n target ::= identifier\n | "(" target_list ")"\n | "[" [target_list] "]"\n | attributeref\n | subscription\n | slicing\n\n(See section Primaries for the syntax definitions for the last three\nsymbols.)\n\nAn assignment statement evaluates the expression list (remember that\nthis can be a single expression or a comma-separated list, the latter\nyielding a tuple) and assigns the single resulting object to each of\nthe target lists, from left to right.\n\nAssignment is defined recursively depending on the form of the target\n(list). When a target is part of a mutable object (an attribute\nreference, subscription or slicing), the mutable object must\nultimately perform the assignment and decide about its validity, and\nmay raise an exception if the assignment is unacceptable. The rules\nobserved by various types and the exceptions raised are given with the\ndefinition of the object types (see section The standard type\nhierarchy).\n\nAssignment of an object to a target list is recursively defined as\nfollows.\n\n* If the target list is a single target: The object is assigned to\n that target.\n\n* If the target list is a comma-separated list of targets: The\n object must be an iterable with the same number of items as there\n are targets in the target list, and the items are assigned, from\n left to right, to the corresponding targets.\n\nAssignment of an object to a single target is recursively defined as\nfollows.\n\n* If the target is an identifier (name):\n\n * If the name does not occur in a "global" statement in the\n current code block: the name is bound to the object in the current\n local namespace.\n\n * Otherwise: the name is bound to the object in the current global\n namespace.\n\n The name is rebound if it was already bound. This may cause the\n reference count for the object previously bound to the name to reach\n zero, causing the object to be deallocated and its destructor (if it\n has one) to be called.\n\n* If the target is a target list enclosed in parentheses or in\n square brackets: The object must be an iterable with the same number\n of items as there are targets in the target list, and its items are\n assigned, from left to right, to the corresponding targets.\n\n* If the target is an attribute reference: The primary expression in\n the reference is evaluated. It should yield an object with\n assignable attributes; if this is not the case, "TypeError" is\n raised. That object is then asked to assign the assigned object to\n the given attribute; if it cannot perform the assignment, it raises\n an exception (usually but not necessarily "AttributeError").\n\n Note: If the object is a class instance and the attribute reference\n occurs on both sides of the assignment operator, the RHS expression,\n "a.x" can access either an instance attribute or (if no instance\n attribute exists) a class attribute. The LHS target "a.x" is always\n set as an instance attribute, creating it if necessary. Thus, the\n two occurrences of "a.x" do not necessarily refer to the same\n attribute: if the RHS expression refers to a class attribute, the\n LHS creates a new instance attribute as the target of the\n assignment:\n\n class Cls:\n x = 3 # class variable\n inst = Cls()\n inst.x = inst.x + 1 # writes inst.x as 4 leaving Cls.x as 3\n\n This description does not necessarily apply to descriptor\n attributes, such as properties created with "property()".\n\n* If the target is a subscription: The primary expression in the\n reference is evaluated. It should yield either a mutable sequence\n object (such as a list) or a mapping object (such as a dictionary).\n Next, the subscript expression is evaluated.\n\n If the primary is a mutable sequence object (such as a list), the\n subscript must yield a plain integer. If it is negative, the\n sequence\'s length is added to it. The resulting value must be a\n nonnegative integer less than the sequence\'s length, and the\n sequence is asked to assign the assigned object to its item with\n that index. If the index is out of range, "IndexError" is raised\n (assignment to a subscripted sequence cannot add new items to a\n list).\n\n If the primary is a mapping object (such as a dictionary), the\n subscript must have a type compatible with the mapping\'s key type,\n and the mapping is then asked to create a key/datum pair which maps\n the subscript to the assigned object. This can either replace an\n existing key/value pair with the same key value, or insert a new\n key/value pair (if no key with the same value existed).\n\n* If the target is a slicing: The primary expression in the\n reference is evaluated. It should yield a mutable sequence object\n (such as a list). The assigned object should be a sequence object\n of the same type. Next, the lower and upper bound expressions are\n evaluated, insofar they are present; defaults are zero and the\n sequence\'s length. The bounds should evaluate to (small) integers.\n If either bound is negative, the sequence\'s length is added to it.\n The resulting bounds are clipped to lie between zero and the\n sequence\'s length, inclusive. Finally, the sequence object is asked\n to replace the slice with the items of the assigned sequence. The\n length of the slice may be different from the length of the assigned\n sequence, thus changing the length of the target sequence, if the\n object allows it.\n\n**CPython implementation detail:** In the current implementation, the\nsyntax for targets is taken to be the same as for expressions, and\ninvalid syntax is rejected during the code generation phase, causing\nless detailed error messages.\n\nWARNING: Although the definition of assignment implies that overlaps\nbetween the left-hand side and the right-hand side are \'safe\' (for\nexample "a, b = b, a" swaps two variables), overlaps *within* the\ncollection of assigned-to variables are not safe! For instance, the\nfollowing program prints "[0, 2]":\n\n x = [0, 1]\n i = 0\n i, x[i] = 1, 2\n print x\n\n\nAugmented assignment statements\n===============================\n\nAugmented assignment is the combination, in a single statement, of a\nbinary operation and an assignment statement:\n\n augmented_assignment_stmt ::= augtarget augop (expression_list | yield_expression)\n augtarget ::= identifier | attributeref | subscription | slicing\n augop ::= "+=" | "-=" | "*=" | "/=" | "//=" | "%=" | "**="\n | ">>=" | "<<=" | "&=" | "^=" | "|="\n\n(See section Primaries for the syntax definitions for the last three\nsymbols.)\n\nAn augmented assignment evaluates the target (which, unlike normal\nassignment statements, cannot be an unpacking) and the expression\nlist, performs the binary operation specific to the type of assignment\non the two operands, and assigns the result to the original target.\nThe target is only evaluated once.\n\nAn augmented assignment expression like "x += 1" can be rewritten as\n"x = x + 1" to achieve a similar, but not exactly equal effect. In the\naugmented version, "x" is only evaluated once. Also, when possible,\nthe actual operation is performed *in-place*, meaning that rather than\ncreating a new object and assigning that to the target, the old object\nis modified instead.\n\nWith the exception of assigning to tuples and multiple targets in a\nsingle statement, the assignment done by augmented assignment\nstatements is handled the same way as normal assignments. Similarly,\nwith the exception of the possible *in-place* behavior, the binary\noperation performed by augmented assignment is the same as the normal\nbinary operations.\n\nFor targets which are attribute references, the same caveat about\nclass and instance attributes applies as for regular assignments.\n',
5 'atom-identifiers': u'\nIdentifiers (Names)\n*******************\n\nAn identifier occurring as an atom is a name. See section Identifiers\nand keywords for lexical definition and section Naming and binding for\ndocumentation of naming and binding.\n\nWhen the name is bound to an object, evaluation of the atom yields\nthat object. When a name is not bound, an attempt to evaluate it\nraises a "NameError" exception.\n\n**Private name mangling:** When an identifier that textually occurs in\na class definition begins with two or more underscore characters and\ndoes not end in two or more underscores, it is considered a *private\nname* of that class. Private names are transformed to a longer form\nbefore code is generated for them. The transformation inserts the\nclass name, with leading underscores removed and a single underscore\ninserted, in front of the name. For example, the identifier "__spam"\noccurring in a class named "Ham" will be transformed to "_Ham__spam".\nThis transformation is independent of the syntactical context in which\nthe identifier is used. If the transformed name is extremely long\n(longer than 255 characters), implementation defined truncation may\nhappen. If the class name consists only of underscores, no\ntransformation is done.\n',
7 'attribute-access': u'\nCustomizing attribute access\n****************************\n\nThe following methods can be defined to customize the meaning of\nattribute access (use of, assignment to, or deletion of "x.name") for\nclass instances.\n\nobject.__getattr__(self, name)\n\n Called when an attribute lookup has not found the attribute in the\n usual places (i.e. it is not an instance attribute nor is it found\n in the class tree for "self"). "name" is the attribute name. This\n method should return the (computed) attribute value or raise an\n "AttributeError" exception.\n\n Note that if the attribute is found through the normal mechanism,\n "__getattr__()" is not called. (This is an intentional asymmetry\n between "__getattr__()" and "__setattr__()".) This is done both for\n efficiency reasons and because otherwise "__getattr__()" would have\n no way to access other attributes of the instance. Note that at\n least for instance variables, you can fake total control by not\n inserting any values in the instance attribute dictionary (but\n instead inserting them in another object). See the\n "__getattribute__()" method below for a way to actually get total\n control in new-style classes.\n\nobject.__setattr__(self, name, value)\n\n Called when an attribute assignment is attempted. This is called\n instead of the normal mechanism (i.e. store the value in the\n instance dictionary). *name* is the attribute name, *value* is the\n value to be assigned to it.\n\n If "__setattr__()" wants to assign to an instance attribute, it\n should not simply execute "self.name = value" --- this would cause\n a recursive call to itself. Instead, it should insert the value in\n the dictionary of instance attributes, e.g., "self.__dict__[name] =\n value". For new-style classes, rather than accessing the instance\n dictionary, it should call the base class method with the same\n name, for example, "object.__setattr__(self, name, value)".\n\nobject.__delattr__(self, name)\n\n Like "__setattr__()" but for attribute deletion instead of\n assignment. This should only be implemented if "del obj.name" is\n meaningful for the object.\n\n\nMore attribute access for new-style classes\n===========================================\n\nThe following methods only apply to new-style classes.\n\nobject.__getattribute__(self, name)\n\n Called unconditionally to implement attribute accesses for\n instances of the class. If the class also defines "__getattr__()",\n the latter will not be called unless "__getattribute__()" either\n calls it explicitly or raises an "AttributeError". This method\n should return the (computed) attribute value or raise an\n "AttributeError" exception. In order to avoid infinite recursion in\n this method, its implementation should always call the base class\n method with the same name to access any attributes it needs, for\n example, "object.__getattribute__(self, name)".\n\n Note: This method may still be bypassed when looking up special\n methods as the result of implicit invocation via language syntax\n or built-in functions. See Special method lookup for new-style\n classes.\n\n\nImplementing Descriptors\n========================\n\nThe following methods only apply when an instance of the class\ncontaining the method (a so-called *descriptor* class) appears in an\n*owner* class (the descriptor must be in either the owner\'s class\ndictionary or in the class dictionary for one of its parents). In the\nexamples below, "the attribute" refers to the attribute whose name is\nthe key of the property in the owner class\' "__dict__".\n\nobject.__get__(self, instance, owner)\n\n Called to get the attribute of the owner class (class attribute\n access) or of an instance of that class (instance attribute\n access). *owner* is always the owner class, while *instance* is the\n instance that the attribute was accessed through, or "None" when\n the attribute is accessed through the *owner*. This method should\n return the (computed) attribute value or raise an "AttributeError"\n exception.\n\nobject.__set__(self, instance, value)\n\n Called to set the attribute on an instance *instance* of the owner\n class to a new value, *value*.\n\nobject.__delete__(self, instance)\n\n Called to delete the attribute on an instance *instance* of the\n owner class.\n\n\nInvoking Descriptors\n====================\n\nIn general, a descriptor is an object attribute with "binding\nbehavior", one whose attribute access has been overridden by methods\nin the descriptor protocol: "__get__()", "__set__()", and\n"__delete__()". If any of those methods are defined for an object, it\nis said to be a descriptor.\n\nThe default behavior for attribute access is to get, set, or delete\nthe attribute from an object\'s dictionary. For instance, "a.x" has a\nlookup chain starting with "a.__dict__[\'x\']", then\n"type(a).__dict__[\'x\']", and continuing through the base classes of\n"type(a)" excluding metaclasses.\n\nHowever, if the looked-up value is an object defining one of the\ndescriptor methods, then Python may override the default behavior and\ninvoke the descriptor method instead. Where this occurs in the\nprecedence chain depends on which descriptor methods were defined and\nhow they were called. Note that descriptors are only invoked for new\nstyle objects or classes (ones that subclass "object()" or "type()").\n\nThe starting point for descriptor invocation is a binding, "a.x". How\nthe arguments are assembled depends on "a":\n\nDirect Call\n The simplest and least common call is when user code directly\n invokes a descriptor method: "x.__get__(a)".\n\nInstance Binding\n If binding to a new-style object instance, "a.x" is transformed\n into the call: "type(a).__dict__[\'x\'].__get__(a, type(a))".\n\nClass Binding\n If binding to a new-style class, "A.x" is transformed into the\n call: "A.__dict__[\'x\'].__get__(None, A)".\n\nSuper Binding\n If "a" is an instance of "super", then the binding "super(B,\n obj).m()" searches "obj.__class__.__mro__" for the base class "A"\n immediately preceding "B" and then invokes the descriptor with the\n call: "A.__dict__[\'m\'].__get__(obj, obj.__class__)".\n\nFor instance bindings, the precedence of descriptor invocation depends\non the which descriptor methods are defined. A descriptor can define\nany combination of "__get__()", "__set__()" and "__delete__()". If it\ndoes not define "__get__()", then accessing the attribute will return\nthe descriptor object itself unless there is a value in the object\'s\ninstance dictionary. If the descriptor defines "__set__()" and/or\n"__delete__()", it is a data descriptor; if it defines neither, it is\na non-data descriptor. Normally, data descriptors define both\n"__get__()" and "__set__()", while non-data descriptors have just the\n"__get__()" method. Data descriptors with "__set__()" and "__get__()"\ndefined always override a redefinition in an instance dictionary. In\ncontrast, non-data descriptors can be overridden by instances.\n\nPython methods (including "staticmethod()" and "classmethod()") are\nimplemented as non-data descriptors. Accordingly, instances can\nredefine and override methods. This allows individual instances to\nacquire behaviors that differ from other instances of the same class.\n\nThe "property()" function is implemented as a data descriptor.\nAccordingly, instances cannot override the behavior of a property.\n\n\n__slots__\n=========\n\nBy default, instances of both old and new-style classes have a\ndictionary for attribute storage. This wastes space for objects\nhaving very few instance variables. The space consumption can become\nacute when creating large numbers of instances.\n\nThe default can be overridden by defining *__slots__* in a new-style\nclass definition. The *__slots__* declaration takes a sequence of\ninstance variables and reserves just enough space in each instance to\nhold a value for each variable. Space is saved because *__dict__* is\nnot created for each instance.\n\n__slots__\n\n This class variable can be assigned a string, iterable, or sequence\n of strings with variable names used by instances. If defined in a\n new-style class, *__slots__* reserves space for the declared\n variables and prevents the automatic creation of *__dict__* and\n *__weakref__* for each instance.\n\n New in version 2.2.\n\nNotes on using *__slots__*\n\n* When inheriting from a class without *__slots__*, the *__dict__*\n attribute of that class will always be accessible, so a *__slots__*\n definition in the subclass is meaningless.\n\n* Without a *__dict__* variable, instances cannot be assigned new\n variables not listed in the *__slots__* definition. Attempts to\n assign to an unlisted variable name raises "AttributeError". If\n dynamic assignment of new variables is desired, then add\n "\'__dict__\'" to the sequence of strings in the *__slots__*\n declaration.\n\n Changed in version 2.3: Previously, adding "\'__dict__\'" to the\n *__slots__* declaration would not enable the assignment of new\n attributes not specifically listed in the sequence of instance\n variable names.\n\n* Without a *__weakref__* variable for each instance, classes\n defining *__slots__* do not support weak references to its\n instances. If weak reference support is needed, then add\n "\'__weakref__\'" to the sequence of strings in the *__slots__*\n declaration.\n\n Changed in version 2.3: Previously, adding "\'__weakref__\'" to the\n *__slots__* declaration would not enable support for weak\n references.\n\n* *__slots__* are implemented at the class level by creating\n descriptors (Implementing Descriptors) for each variable name. As a\n result, class attributes cannot be used to set default values for\n instance variables defined by *__slots__*; otherwise, the class\n attribute would overwrite the descriptor assignment.\n\n* The action of a *__slots__* declaration is limited to the class\n where it is defined. As a result, subclasses will have a *__dict__*\n unless they also define *__slots__* (which must only contain names\n of any *additional* slots).\n\n* If a class defines a slot also defined in a base class, the\n instance variable defined by the base class slot is inaccessible\n (except by retrieving its descriptor directly from the base class).\n This renders the meaning of the program undefined. In the future, a\n check may be added to prevent this.\n\n* Nonempty *__slots__* does not work for classes derived from\n "variable-length" built-in types such as "long", "str" and "tuple".\n\n* Any non-string iterable may be assigned to *__slots__*. Mappings\n may also be used; however, in the future, special meaning may be\n assigned to the values corresponding to each key.\n\n* *__class__* assignment works only if both classes have the same\n *__slots__*.\n\n Changed in version 2.6: Previously, *__class__* assignment raised an\n error if either new or old class had *__slots__*.\n',
18 'break': u'\nThe "break" statement\n*********************\n\n break_stmt ::= "break"\n\n"break" may only occur syntactically nested in a "for" or "while"\nloop, but not nested in a function or class definition within that\nloop.\n\nIt terminates the nearest enclosing loop, skipping the optional "else"\nclause if the loop has one.\n\nIf a "for" loop is terminated by "break", the loop control target\nkeeps its current value.\n\nWhen "break" passes control out of a "try" statement with a "finally"\nclause, that "finally" clause is executed before really leaving the\nloop.\n',
20 '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 arguments. In the case of a keyword\nappearing in both "expression" and as an explicit keyword argument, a\n"TypeError" exception is raised.\n\nFormal parameters using the syntax "*identifier" or "**identifier"\ncannot be used as positional argument slots or as keyword argument\nnames. Formal parameters using the syntax "(sublist)" cannot be used\nas keyword argument names; the outermost sublist corresponds to a\nsingle unnamed argument slot, and the argument value is assigned to\nthe sublist using the usual tuple assignment rules after all other\nparameter processing is done.\n\nA call always returns some value, possibly "None", unless it raises an\nexception. How this value is computed depends on the type of the\ncallable object.\n\nIf it is---\n\na user-defined function:\n The code block for the function is executed, passing it the\n argument list. The first thing the code block will do is bind the\n formal parameters to the arguments; this is described in section\n Function definitions. When the code block executes a "return"\n statement, this specifies the return value of the function call.\n\na built-in function or method:\n The result is up to the interpreter; see Built-in Functions for the\n descriptions of built-in functions and methods.\n\na class object:\n A new instance of that class is returned.\n\na class instance method:\n The corresponding user-defined function is called, with an argument\n list that is one longer than the argument list of the call: the\n instance becomes the first argument.\n\na class instance:\n The class must define a "__call__()" method; the effect is then the\n same as if that method was called.\n',
21 'class': u'\nClass definitions\n*****************\n\nA class definition defines a class object (see section The standard\ntype hierarchy):\n\n classdef ::= "class" classname [inheritance] ":" suite\n inheritance ::= "(" [expression_list] ")"\n classname ::= identifier\n\nA class definition i
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 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...]

Completed in 866 milliseconds

12