Searched defs:one (Results 1 - 25 of 42) sorted by last modified time

12

/device/linaro/bootloader/edk2/StdLib/LibC/Math/
H A De_acos.c61 one = 1.00000000000000000000e+00, /* 0x3FF00000, 0x00000000 */ variable
97 q = one+z*(qS1+z*(qS2+z*(qS3+z*qS4)));
102 z = (one+x)*0.5;
104 q = one+z*(qS1+z*(qS2+z*(qS3+z*qS4)));
111 z = (one-x)*0.5;
117 q = one+z*(qS1+z*(qS2+z*(qS3+z*qS4)));
H A De_asin.c58 one = 1.00000000000000000000e+00, /* 0x3FF00000, 0x00000000 */ variable
93 if(huge+x>one) return x;/* return x with inexact if x!=0*/
97 q = one+t*(qS1+t*(qS2+t*(qS3+t*qS4)));
102 w = one-fabs(x);
105 q = one+t*(qS1+t*(qS2+t*(qS3+t*qS4)));
H A De_cosh.c47 static const double one = 1.0, half=0.5, huge = 1.0e300; variable
66 w = one+t;
68 return one+(t*t)/(w+w);
H A De_exp.c90 one = 1.0, variable
147 if(huge+x>one) return one+x;/* trigger inexact */
154 if(k==0) return one-((x*c)/(c-2.0)-x);
155 else y = one-((lo-(x*c)/(2.0-c))-hi);
H A De_fmod.c32 static const double one = 1.0, Zero[] = {0.0, -0.0,}; variable
135 x *= one; /* create necessary signal */
H A De_pow.c89 one = 1.0, variable
131 if((iy|ly)==0) return one;
169 if(hy<0) return one/x; else return x;
183 if(hy<0) z = one/z; /* z = (1/|x|) */
202 s = one; /* s (sign of result -ve**odd) = -1 else = 1 */
203 if((n|(yisint-1))==0) s = -one;/* (-ve)**(odd int) */
211 /* over/underflow if x is not close to one */
216 t = ax-one; /* t has 20 trailing zeros */
240 v = one/(ax+bp[k]);
317 z = one
[all...]
H A De_sinh.c39 static const double one = 1.0, shuge = 1.0e307; variable
60 if(shuge+x>one) return x;/* sinh(tiny) = tiny with inexact */
62 if(ix<0x3ff00000) return h*(2.0*t-t*t/(t+one));
63 return h*(t+t/(t+one));
H A De_sqrt.c40 * | Use the hardware sqrt if you have one |
55 * To compute q from q , one checks whether
89 * After generating the 53 bits result, we compute one more bit.
107 static const double one = 1.0, tiny=1.0e-300; variable
189 z = one-tiny; /* trigger inexact flag */
190 if (z>=one) {
191 z = one+tiny;
193 else if (z>one) {
218 The second one uses reciproot iterations to avoid division, but
286 This formula has one divisio
[all...]
H A Dk_cos.c57 one = 1.00000000000000000000e+00, /* 0x3FF00000, 0x00000000 */ variable
73 if(((int)x)==0) return one; /* generate inexact */
78 return one - (0.5*z - (z*r - x*y));
86 a = one-qx;
H A Dk_rem_pio2.c56 * precison, one may have to do something like:
152 one = 1.0, variable
222 z = one - z;
223 if(carry!=0) z -= scalbn(one,q0);
259 fw = scalbn(one,q0);
H A Dk_tan.c69 /* one */ 1.00000000000000000000e+00, /* 3FF00000, 00000000 */
73 #define one xxx[13] macro
91 return one / fabs(x);
101 t = a = -one / w;
103 s = one + t * z;
H A Ds_atan.c22 * is further reduced to one of the following intervals and the
70 one = 1.0, variable
91 if(huge+x>one) return x; /* raise inexact */
98 id = 0; x = (2.0*x-one)/(2.0+x);
100 id = 1; x = (x-one)/(x+one);
104 id = 2; x = (x-1.5)/(one+1.5*x);
H A Ds_expm1.c86 * (A). To save one multiplication, we scale the coefficient Qi
122 one = 1.0, variable
163 return tiny-one; /* return -1 */
192 r1 = one+hxs*(Q1+hxs*(Q2+hxs*(Q3+hxs*(Q4+hxs*Q5))));
202 else return one+2.0*(x-e);
206 y = one-(e-x);
209 return y-one;
211 t = one;
222 y += one;
H A Ds_modf.c31 static const double one = 1.0; variable
59 *iptr = x*one;
H A Ds_tanh.c28 * 2. 0 <= x <= 2**-55 : tanh(x) := x*(one+x)
45 static const double one=1.0, two=2.0, tiny = 1.0e-300; variable
59 if (jx>=0) return one/x+one; /* tanh(+-inf)=+-1 */
60 else return one/x-one; /* tanh(NaN) = NaN */
66 return x*(one+x); /* tanh(small) = small */
69 z = one - two/(t+two);
76 z = one - tiny; /* raised inexact flag */
/device/linaro/bootloader/edk2/AppPkg/Applications/Enquire/
H A DEnquire.c355 one of these warnings, the output may be wrong, so you should check
932 /* The program has received a signal where it wasn't expecting one */
1879 /* Minimum value: assume either two's or one's complement *********/
2131 I never make a change to one that I forget to make to the other.
2527 /* Minimum value: assume either two's or one's complement *********/
3284 Volatile Number d, oldd, dbase, one, zero; local
3305 eprec=0; d=1.0; dbase=base; one=1.0; zero=0.0;
3308 while ((((d+one)-d)-one) == zero && d>oldd);
/device/linaro/bootloader/edk2/AppPkg/Applications/Python/PyMod-2.7.2/Objects/
H A Dlongobject.c60 of the algorithms used, this could save at most be one word anyway. */
698 * make sure at least one sign bit gets stored. */
739 loop below wouldn't add one either. Make sure a sign bit
838 #define IS_LITTLE_ENDIAN (int)*(unsigned char*)&one
917 int one = 1; local
928 int one = 1; local
940 int one = 1; local
992 int one = 1; local
1396 /* pout should have at least one digit, so that the case when a = 0
1430 /* pout[size-1]: always produce at least one decima
3022 PyLongObject *one; local
[all...]
/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.10/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',
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',
10 'binary': u'\nBinary arithmetic operations\n****************************\n\nThe binary arithmetic operations have the conventional priority\nlevels. Note that some of these operations also apply to certain non-\nnumeric types. Apart from the power operator, there are only two\nlevels, one for multiplicative operators and one for additive\noperators:\n\n m_expr ::= u_expr | m_expr "*" u_expr | m_expr "//" u_expr | m_expr "/" u_expr\n | m_expr "%" u_expr\n a_expr ::= m_expr | a_expr "+" m_expr | a_expr "-" m_expr\n\nThe "*" (multiplication) operator yields the product of its arguments.\nThe arguments must either both be numbers, or one argument must be an\ninteger (plain or long) and the other must be a sequence. In the\nformer case, the numbers are converted to a common type and then\nmultiplied together. In the latter case, sequence repetition is\nperformed; a negative repetition factor yields an empty sequence.\n\nThe "/" (division) and "//" (floor division) operators yield the\nquotient of their arguments. The numeric arguments are first\nconverted to a common type. Plain or long integer division yields an\ninteger of the same type; the result is that of mathematical division\nwith the \'floor\' function applied to the result. Division by zero\nraises the "ZeroDivisionError" exception.\n\nThe "%" (modulo) operator yields the remainder from the division of\nthe first argument by the second. The numeric arguments are first\nconverted to a common type. A zero right argument raises the\n"ZeroDivisionError" exception. The arguments may be floating point\nnumbers, e.g., "3.14%0.7" equals "0.34" (since "3.14" equals "4*0.7 +\n0.34".) The modulo operator always yields a result with the same sign\nas its second operand (or zero); the absolute value of the result is\nstrictly smaller than the absolute value of the second operand [2].\n\nThe integer division and modulo operators are connected by the\nfollowing identity: "x == (x/y)*y + (x%y)". Integer division and\nmodulo are also connected with the built-in function "divmod()":\n"divmod(x, y) == (x/y, x%y)". These identities don\'t hold for\nfloating point numbers; there similar identities hold approximately\nwhere "x/y" is replaced by "floor(x/y)" or "floor(x/y) - 1" [3].\n\nIn addition to performing the modulo operation on numbers, the "%"\noperator is also overloaded by string and unicode objects to perform\nstring formatting (also known as interpolation). The syntax for string\nformatting is described in the Python Library Reference, section\nString Formatting Operations.\n\nDeprecated since version 2.3: The floor division operator, the modulo\noperator, and the "divmod()" function are no longer defined for\ncomplex numbers. Instead, convert to a floating point number using\nthe "abs()" function if appropriate.\n\nThe "+" (addition) operator yields the sum of its arguments. The\narguments must either both be numbers or both sequences of the same\ntype. In the former case, the numbers are converted to a common type\nand then added together. In the latter case, the sequences are\nconcatenated.\n\nThe "-" (subtraction) operator yields the difference of its arguments.\nThe numeric arguments are first converted to a common type.\n',
13 'bltin-ellipsis-object': u'\nThe Ellipsis Object\n*******************\n\nThis object is used by extended slice notation (see Slicings). It\nsupports no special operations. There is exactly one ellipsis object,\nnamed "Ellipsis" (a built-in name).\n\nIt is written as "Ellipsis". When in a subscript, it can also be\nwritten as "...", for example "seq[...]".\n',
14 'bltin-null-object': u'\nThe Null Object\n***************\n\nThis object is returned by functions that don\'t explicitly return a\nvalue. It supports no special operations. There is exactly one null\nobject, named "None" (a built-in name).\n\nIt is written as "None".\n',
17 '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
26 'customization': u'\\nBasic customization\\n*******************\\n\\nobject.__new__(cls[, ...])\\n\\n Called to create a new instance of class *cls*. "__new__()" is a\\n static method (special-cased so you need not declare it as such)\\n that takes the class of which an instance was requested as its\\n first argument. The remaining arguments are those passed to the\\n object constructor expression (the call to the class). The return\\n value of "__new__()" should be the new object instance (usually an\\n instance of *cls*).\\n\\n Typical implementations create a new instance of the class by\\n invoking the superclass\\'s "__new__()" method using\\n "super(currentclass, cls).__new__(cls[, ...])" with appropriate\\n arguments and then modifying the newly-created instance as\\n necessary before returning it.\\n\\n If "__new__()" returns an instance of *cls*, then the new\\n instance\\'s "__init__()" method will be invoked like\\n "__init__(self[, ...])", where *self* is the new instance and the\\n remaining arguments are the same as were passed to "__new__()".\\n\\n If "__new__()" does not return an instance of *cls*, then the new\\n instance\\'s "__init__()" method will not be invoked.\\n\\n "__new__()" is intended mainly to allow subclasses of immutable\\n types (like int, str, or tuple) to customize instance creation. It\\n is also commonly overridden in custom metaclasses in order to\\n customize class creation.\\n\\nobject.__init__(self[, ...])\\n\\n Called after the instance has been created (by "__new__()"), but\\n before it is returned to the caller. The arguments are those\\n passed to the class constructor expression. If a base class has an\\n "__init__()" method, the derived class\\'s "__init__()" method, if\\n any, must explicitly call it to ensure proper initialization of the\\n base class part of the instance; for example:\\n "BaseClass.__init__(self, [args...])".\\n\\n Because "__new__()" and "__init__()" work together in constructing\\n objects ("__new__()" to create it, and "__init__()" to customise\\n it), no non-"None" value may be returned by "__init__()"; doing so\\n will cause a "TypeError" to be raised at runtime.\\n\\nobject.__del__(self)\\n\\n Called when the instance is about to be destroyed. This is also\\n called a destructor. If a base class has a "__del__()" method, the\\n derived class\\'s "__del__()" method, if any, must explicitly call it\\n to ensure proper deletion of the base class part of the instance.\\n Note that it is possible (though not recommended!) for the\\n "__del__()" method to postpone destruction of the instance by\\n creating a new reference to it. It may then be called at a later\\n time when this new reference is deleted. It is not guaranteed that\\n "__del__()" methods are called for objects that still exist when\\n the interpreter exits.\\n\\n Note: "del x" doesn\\'t directly call "x.__del__()" --- the former\\n decrements the reference count for "x" by one, and the latter is\\n only called when "x"\\'s reference count reaches zero. Some common\\n situations that may prevent the reference count of an object from\\n going to zero include: circular references between objects (e.g.,\\n a doubly-linked list or a tree data structure with parent and\\n child pointers); a reference to the object on the stack frame of\\n a function that caught an exception (the traceback stored in\\n "sys.exc_traceback" keeps the stack frame alive); or a reference\\n to the object on the stack frame that raised an unhandled\\n exception in interactive mode (the traceback stored in\\n "sys.last_traceback" keeps the stack frame alive). The first\\n situation can only be remedied by explicitly breaking the cycles;\\n the latter two situations can be resolved by storing "None" in\\n "sys.exc_traceback" or "sys.last_traceback". Circular references\\n which are garbage are detected when the option cycle detector is\\n enabled (it\\'s on by default), but can only be cleaned up if there\\n are no Python-level "__del__()" methods involved. Refer to the\\n documentation for the "gc" module for more information about how\\n "__del__()" methods are handled by the cycle detector,\\n particularly the description of the "garbage" value.\\n\\n Warning: Due to the precarious circumstances under which\\n "__del__()" methods are invoked, exceptions that occur during\\n their execution are ignored, and a warning is printed to\\n "sys.stderr" instead. Also, when "__del__()" is invoked in\\n response to a module being deleted (e.g., when execution of the\\n program is done), other globals referenced by the "__del__()"\\n method may already have been deleted or in the process of being\\n torn down (e.g. the import machinery shutting down). For this\\n reason, "__del__()" methods should do the absolute minimum needed\\n to maintain external invariants. Starting with version 1.5,\\n Python guarantees that globals whose name begins with a single\\n underscore are deleted from their module before other globals are\\n deleted; if no other references to such globals exist, this may\\n help in assuring that imported modules are still available at the\\n time when the "__del__()" method is called.\\n\\n See also the "-R" command-line option.\\n\\nobject.__repr__(self)\\n\\n Called by the "repr()" built-in function and by string conversions\\n (reverse quotes) to compute the "official" string representation of\\n an object. If at all possible, this should look like a valid\\n Python expression that could be used to recreate an object with the\\n same value (given an appropriate environment). If this is not\\n possible, a string of the form "<...some useful description...>"\\n should be returned. The return value must be a string object. If a\\n class defines "__repr__()" but not "__str__()", then "__repr__()"\\n is also used when an "informal" string representation of instances\\n of that class is required.\\n\\n This is typically used for debugging, so it is important that the\\n representation is information-rich and unambiguous.\\n\\nobject.__str__(self)\\n\\n Called by the "str()" built-in function and by the "print"\\n statement to compute the "informal" string representation of an\\n object. This differs from "__repr__()" in that it does not have to\\n be a valid Python expression: a more convenient or concise\\n representation may be used instead. The return value must be a\\n string object.\\n\\nobject.__lt__(self, other)\\nobject.__le__(self, other)\\nobject.__eq__(self, other)\\nobject.__ne__(self, other)\\nobject.__gt__(self, other)\\nobject.__ge__(self, other)\\n\\n New in version 2.1.\\n\\n These are the so-called "rich comparison" methods, and are called\\n for comparison operators in preference to "__cmp__()" below. The\\n correspondence between operator symbols and method names is as\\n follows: "x<y" calls "x.__lt__(y)", "x<=y" calls "x.__le__(y)",\\n "x==y" calls "x.__eq__(y)", "x!=y" and "x<>y" call "x.__ne__(y)",\\n "x>y" calls "x.__gt__(y)", and "x>=y" calls "x.__ge__(y)".\\n\\n A rich comparison method may return the singleton "NotImplemented"\\n if it does not implement the operation for a given pair of\\n arguments. By convention, "False" and "True" are returned for a\\n successful comparison. However, these methods can return any value,\\n so if the comparison operator is used in a Boolean context (e.g.,\\n in the condition of an "if" statement), Python will call "bool()"\\n on the value to determine if the result is true or false.\\n\\n There are no implied relationships among the comparison operators.\\n The truth of "x==y" does not imply that "x!=y" is false.\\n Accordingly, when defining "__eq__()", one should also define\\n "__ne__()" so that the operators will behave as expected. See the\\n paragraph on "__hash__()" for some important notes on creating\\n *hashable* objects which support custom comparison operations and\\n are usable as dictionary keys.\\n\\n There are no swapped-argument versions of these methods (to be used\\n when the left argument does not support the operation but the right\\n argument does); rather, "__lt__()" and "__gt__()" are each other\\'s\\n reflection, "__le__()" and "__ge__()" are each other\\'s reflection,\\n and "__eq__()" and "__ne__()" are their own reflection.\\n\\n Arguments to rich comparison methods are never coerced.\\n\\n To automatically generate ordering operations from a single root\\n operation, see "functools.total_ordering()".\\n\\nobject.__cmp__(self, other)\\n\\n Called by comparison operations if rich comparison (see above) is\\n not defined. Should return a negative integer if "self < other",\\n zero if "self == other", a positive integer if "self > other". If\\n no "__cmp__()", "__eq__()" or "__ne__()" operation is defined,\\n class instances are compared by object identity ("address"). See\\n also the description of "__hash__()" for some important notes on\\n creating *hashable* objects which support custom comparison\\n operations and are usable as dictionary keys. (Note: the\\n restriction that exceptions are not propagated by "__cmp__()" has\\n been removed since Python 1.5.)\\n\\nobject.__rcmp__(self, other)\\n\\n Changed in version 2.1: No longer supported.\\n\\nobject.__hash__(self)\\n\\n Called by built-in function "hash()" and for operations on members\\n of hashed collections including "set", "frozenset", and "dict".\\n "__hash__()" should return an integer. The only required property\\n is that objects which compare equal have the same hash value; it is\\n advised to somehow mix together (e.g. using exclusive or) the hash\\n values for the components of the object that also play a part in\\n comparison of objects.\\n\\n If a class does not define a "__cmp__()" or "__eq__()" method it\\n should not define a "__hash__()" operation either; if it defines\\n "__cmp__()" or "__eq__()" but not "__hash__()", its instances will\\n not be usable in hashed collections. If a class defines mutable\\n objects and implements a "__cmp__()" or "__eq__()" method, it\\n should not implement "__hash__()", since hashable collection\\n implementations require that a object\\'s hash value is immutable (if\\n the object\\'s hash value changes, it will be in the wrong hash\\n bucket).\\n\\n User-defined classes have "__cmp__()" and "__hash__()" methods by\\n default; with them, all objects compare unequal (except with\\n themselves) and "x.__hash__()" returns a result derived from\\n "id(x)".\\n\\n Classes which inherit a "__hash__()" method from a parent class but\\n change the meaning of "__cmp__()" or "__eq__()" such that the hash\\n value returned is no longer appropriate (e.g. by switching to a\\n value-based concept of equality instead of the default identity\\n based equality) can explicitly flag themselves as being unhashable\\n by setting "__hash__ = None" in the class definition. Doing so\\n means that not only will instances of the class raise an\\n appropriate "TypeError" when a program attempts to retrieve their\\n hash value, but they will also be correctly identified as\\n unhashable when checking "isinstance(obj, collections.Hashable)"\\n (unlike classes which define their own "__hash__()" to explicitly\\n raise "TypeError").\\n\\n Changed in version 2.5: "__hash__()" may now also return a long\\n integer object; the 32-bit integer is then derived from the hash of\\n that object.\\n\\n Changed in version 2.6: "__hash__" may now be set to "None" to\\n explicitly flag instances of a class as unhashable.\\n\\nobject.__nonzero__(self)\\n\\n Called to implement truth value testing and the built-in operation\\n "bool()"; should return "False" or "True", or their integer\\n equivalents "0" or "1". When this method is not defined,\\n "__len__()" is called, if it is defined, and the object is\\n considered true if its result is nonzero. If a class defines\\n neither "__len__()" nor "__nonzero__()", all its instances are\\n considered true.\\n\\nobject.__unicode__(self)\\n\\n Called to implement "unicode()" built-in; should return a Unicode\\n object. When this method is not defined, string conversion is\\n attempted, and the result of string conversion is converted to\\n Unicode using the system default encoding.\\n', namespace
30 'dynamic-features': u'\\nInteraction with dynamic features\\n*********************************\\n\\nThere are several cases where Python statements are illegal when used\\nin conjunction with nested scopes that contain free variables.\\n\\nIf a variable is referenced in an enclosing scope, it is illegal to\\ndelete the name. An error will be reported at compile time.\\n\\nIf the wild card form of import --- "import *" --- is used in a\\nfunction and the function contains or is a nested block with free\\nvariables, the compiler will raise a "SyntaxError".\\n\\nIf "exec" is used in a function and the function contains or is a\\nnested block with free variables, the compiler will raise a\\n"SyntaxError" unless the exec explicitly specifies the local namespace\\nfor the "exec". (In other words, "exec obj" would be illegal, but\\n"exec obj in ns" would be legal.)\\n\\nThe "eval()", "execfile()", and "input()" functions and the "exec"\\nstatement do not have access to the full environment for resolving\\nnames. Names may be resolved in the local and global namespaces of\\nthe caller. Free variables are not resolved in the nearest enclosing\\nnamespace, but in the global namespace. [1] The "exec" statement and\\nthe "eval()" and "execfile()" functions have optional arguments to\\noverride the global and local namespace. If only one namespace is\\nspecified, it is used for both.\\n', namespace
[all...]
/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.10/Modules/
H A D_struct.c336 TYPE is one of char, byte, ubyte, etc.
2043 int one = 1; local
2046 if ((int)*(unsigned char*)&one)
/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.10/Objects/
H A Denumobject.c83 static PyObject *one = NULL; local
93 if (one == NULL) {
94 one = PyInt_FromLong(1);
95 if (one == NULL)
100 stepped_up = PyNumber_Add(next_index, one);
H A Dfloatobject.c530 PyObject *one = NULL; local
553 one = PyInt_FromLong(1);
554 if (one == NULL)
557 temp = PyNumber_Lshift(ww, one);
563 temp = PyNumber_Lshift(vv, one);
569 temp = PyNumber_Or(vv, one);
583 Py_XDECREF(one);
756 it will always be very close to one.
885 * one. Replace iv by its absolute value and remember
1037 * systems raise an exception then (RISCOS was mentioned as one,
[all...]
/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.10/PyMod-2.7.10/Objects/
H A Dlongobject.c56 of the algorithms used, this could save at most be one word anyway. */
712 * make sure at least one sign bit gets stored. */
753 loop below wouldn't add one either. Make sure a sign bit
852 #define IS_LITTLE_ENDIAN (int)*(unsigned char*)&one
931 int one = 1; local
942 int one = 1; local
954 int one = 1; local
1006 int one = 1; local
1410 /* pout should have at least one digit, so that the case when a = 0
1444 /* pout[size-1]: always produce at least one decima
3036 PyLongObject *one; local
[all...]
/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.10/Python/
H A Dbltinmodule.c399 Return a string of one character with ordinal i; 0 <= i < 256.");
417 Return a Unicode string of one character with ordinal i; 0 <= i <= 0x10ffff.");
1085 the argument sequence(s). If more than one sequence is given, the\n\
1089 the items of the sequence (or a list of tuples if more than one sequence).");
1548 Return the integer ordinal of a one-character string.");
1714 PyObject *one = NULL; local
1722 if ((one = PyLong_FromLong(1L)) == NULL)
1728 if ((diff = PyNumber_Subtract(tmp1, one)) == NULL)
1734 if ((tmp3 = PyNumber_Add(tmp2, one)) == NULL)
1747 Py_DECREF(one);
[all...]
/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.2/Lib/pydoc_data/
H A Dtopics.py3 '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 object\n must be an iterable with the same number of items as there are\n targets in the target list, and the items are assigned, from left to\n 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 square\n brackets: The object must be an iterable with the same number of\n 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\n always set as an instance attribute, creating it if necessary.\n Thus, the two occurrences of ``a.x`` do not necessarily refer to the\n same attribute: if the RHS expression refers to a class attribute,\n the 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 reference\n is evaluated. It should yield a mutable sequence object (such as a\n list). The assigned object should be a sequence object of the same\n type. Next, the lower and upper bound expressions are evaluated,\n insofar they are present; defaults are zero and the sequence\'s\n length. The bounds should evaluate to (small) integers. If either\n bound is negative, the sequence\'s length is added to it. The\n resulting bounds are clipped to lie between zero and the sequence\'s\n length, inclusive. Finally, the sequence object is asked to replace\n the slice with the items of the assigned sequence. The length of\n the slice may be different from the length of the assigned sequence,\n thus changing the length of the target sequence, if the object\n 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\nthe augmented version, ``x`` is only evaluated once. Also, when\npossible, the actual operation is performed *in-place*, meaning that\nrather than creating a new object and assigning that to the target,\nthe old object is 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',
6 '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``)\nfor class 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.\n This method should return the (computed) attribute value or raise\n an ``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\n for efficiency reasons and because otherwise ``__getattr__()``\n would have no way to access other attributes of the instance. Note\n that at least for instance variables, you can fake total control by\n not 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\n cause a recursive call to itself. Instead, it should insert the\n value in the dictionary of instance attributes, e.g.,\n ``self.__dict__[name] = value``. For new-style classes, rather\n than accessing the instance dictionary, it should call the base\n class method with the same name, for example,\n ``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\n ``__getattr__()``, the latter will not be called unless\n ``__getattribute__()`` either calls it explicitly or raises an\n ``AttributeError``. This method should return the (computed)\n attribute value or raise an ``AttributeError`` exception. In order\n to avoid infinite recursion in this method, its implementation\n should always call the base class method with the same name to\n access any attributes it needs, for example,\n ``object.__getattribute__(self, name)``.\n\n Note: This method may still be bypassed when looking up special methods\n as the result of implicit invocation via language syntax or\n 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\n ``AttributeError`` 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,\nit is 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\n``type()``).\n\nThe starting point for descriptor invocation is a binding, ``a.x``.\nHow the 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\n ``A`` immediately preceding ``B`` and then invokes the descriptor\n with the 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__()``.\nIf it does not define ``__get__()``, then accessing the attribute will\nreturn the descriptor object itself unless there is a value in the\nobject\'s instance dictionary. If the descriptor defines ``__set__()``\nand/or ``__delete__()``, it is a data descriptor; if it defines\nneither, it is a non-data descriptor. Normally, data descriptors\ndefine both ``__get__()`` and ``__set__()``, while non-data\ndescriptors have just the ``__get__()`` method. Data descriptors with\n``__set__()`` and ``__get__()`` defined always override a redefinition\nin an instance dictionary. In contrast, non-data descriptors can be\noverridden by instances.\n\nPython methods (including ``staticmethod()`` and ``classmethod()``)\nare implemented 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 defining\n *__slots__* do not support weak references to its instances. If weak\n reference support is needed, then add ``\'__weakref__\'`` to the\n sequence of strings in the *__slots__* 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\n a 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 instance\n variable defined by the base class slot is inaccessible (except by\n retrieving its descriptor directly from the base class). This\n 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\n ``tuple``.\n\n* Any non-string iterable may be assigned to *__slots__*. Mappings may\n 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',
9 'binary': u'\nBinary arithmetic operations\n****************************\n\nThe binary arithmetic operations have the conventional priority\nlevels. Note that some of these operations also apply to certain non-\nnumeric types. Apart from the power operator, there are only two\nlevels, one for multiplicative operators and one for additive\noperators:\n\n m_expr ::= u_expr | m_expr "*" u_expr | m_expr "//" u_expr | m_expr "/" u_expr\n | m_expr "%" u_expr\n a_expr ::= m_expr | a_expr "+" m_expr | a_expr "-" m_expr\n\nThe ``*`` (multiplication) operator yields the product of its\narguments. The arguments must either both be numbers, or one argument\nmust be an integer (plain or long) and the other must be a sequence.\nIn the former case, the numbers are converted to a common type and\nthen multiplied together. In the latter case, sequence repetition is\nperformed; a negative repetition factor yields an empty sequence.\n\nThe ``/`` (division) and ``//`` (floor division) operators yield the\nquotient of their arguments. The numeric arguments are first\nconverted to a common type. Plain or long integer division yields an\ninteger of the same type; the result is that of mathematical division\nwith the \'floor\' function applied to the result. Division by zero\nraises the ``ZeroDivisionError`` exception.\n\nThe ``%`` (modulo) operator yields the remainder from the division of\nthe first argument by the second. The numeric arguments are first\nconverted to a common type. A zero right argument raises the\n``ZeroDivisionError`` exception. The arguments may be floating point\nnumbers, e.g., ``3.14%0.7`` equals ``0.34`` (since ``3.14`` equals\n``4*0.7 + 0.34``.) The modulo operator always yields a result with\nthe same sign as its second operand (or zero); the absolute value of\nthe result is strictly smaller than the absolute value of the second\noperand [2].\n\nThe integer division and modulo operators are connected by the\nfollowing identity: ``x == (x/y)*y + (x%y)``. Integer division and\nmodulo are also connected with the built-in function ``divmod()``:\n``divmod(x, y) == (x/y, x%y)``. These identities don\'t hold for\nfloating point numbers; there similar identities hold approximately\nwhere ``x/y`` is replaced by ``floor(x/y)`` or ``floor(x/y) - 1`` [3].\n\nIn addition to performing the modulo operation on numbers, the ``%``\noperator is also overloaded by string and unicode objects to perform\nstring formatting (also known as interpolation). The syntax for string\nformatting is described in the Python Library Reference, section\n*String Formatting Operations*.\n\nDeprecated since version 2.3: The floor division operator, the modulo\noperator, and the ``divmod()`` function are no longer defined for\ncomplex numbers. Instead, convert to a floating point number using\nthe ``abs()`` function if appropriate.\n\nThe ``+`` (addition) operator yields the sum of its arguments. The\narguments must either both be numbers or both sequences of the same\ntype. In the former case, the numbers are converted to a common type\nand then added together. In the latter case, the sequences are\nconcatenated.\n\nThe ``-`` (subtraction) operator yields the difference of its\narguments. The numeric arguments are first converted to a common\ntype.\n',
12 'bltin-ellipsis-object': u'\nThe Ellipsis Object\n*******************\n\nThis object is used by extended slice notation (see *Slicings*). It\nsupports no special operations. There is exactly one ellipsis object,\nnamed ``Ellipsis`` (a built-in name).\n\nIt is written as ``Ellipsis``.\n',
13 'bltin-file-objects': u'\nFile Objects\n************\n\nFile objects are implemented using C\'s ``stdio`` package and can be\ncreated with the built-in ``open()`` function. File objects are also\nreturned by some other built-in functions and methods, such as\n``os.popen()`` and ``os.fdopen()`` and the ``makefile()`` method of\nsocket objects. Temporary files can be created using the ``tempfile``\nmodule, and high-level file operations such as copying, moving, and\ndeleting files and directories can be achieved with the ``shutil``\nmodule.\n\nWhen a file operation fails for an I/O-related reason, the exception\n``IOError`` is raised. This includes situations where the operation\nis not defined for some reason, like ``seek()`` on a tty device or\nwriting a file opened for reading.\n\nFiles have the following methods:\n\nfile.close()\n\n Close the file. A closed file cannot be read or written any more.\n Any operation which requires that the file be open will raise a\n ``ValueError`` after the file has been closed. Calling ``close()``\n more than once is allowed.\n\n As of Python 2.5, you can avoid having to call this method\n explicitly if you use the ``with`` statement. For example, the\n following code will automatically close *f* when the ``with`` block\n is exited:\n\n from __future__ import with_statement # This isn\'t required in Python 2.6\n\n with open("hello.txt") as f:\n for line in f:\n print line\n\n In older versions of Python, you would have needed to do this to\n get the same effect:\n\n f = open("hello.txt")\n try:\n for line in f:\n print line\n finally:\n f.close()\n\n Note: Not all "file-like" types in Python support use as a context\n manager for the ``with`` statement. If your code is intended to\n work with any file-like object, you can use the function\n ``contextlib.closing()`` instead of using the object directly.\n\nfile.flush()\n\n Flush the internal buffer, like ``stdio``\'s ``fflush()``. This may\n be a no-op on some file-like objects.\n\n Note: ``flush()`` does not necessarily write the file\'s data to disk.\n Use ``flush()`` followed by ``os.fsync()`` to ensure this\n behavior.\n\nfile.fileno()\n\n Return the integer "file descriptor" that is used by the underlying\n implementation to request I/O operations from the operating system.\n This can be useful for other, lower level interfaces that use file\n descriptors, such as the ``fcntl`` module or ``os.read()`` and\n friends.\n\n Note: File-like objects which do not have a real file descriptor should\n *not* provide this method!\n\nfile.isatty()\n\n Return ``True`` if the file is connected to a tty(-like) device,\n else ``False``.\n\n Note: If a file-like object is not associated with a real file, this\n method should *not* be implemented.\n\nfile.next()\n\n A file object is its own iterator, for example ``iter(f)`` returns\n *f* (unless *f* is closed). When a file is used as an iterator,\n typically in a ``for`` loop (for example, ``for line in f: print\n line``), the ``next()`` method is called repeatedly. This method\n returns the next input line, or raises ``StopIteration`` when EOF\n is hit when the file is open for reading (behavior is undefined\n when the file is open for writing). In order to make a ``for``\n loop the most efficient way of looping over the lines of a file (a\n very common operation), the ``next()`` method uses a hidden read-\n ahead buffer. As a consequence of using a read-ahead buffer,\n combining ``next()`` with other file methods (like ``readline()``)\n does not work right. However, using ``seek()`` to reposition the\n file to an absolute position will flush the read-ahead buffer.\n\n New in version 2.3.\n\nfile.read([size])\n\n Read at most *size* bytes from the file (less if the read hits EOF\n before obtaining *size* bytes). If the *size* argument is negative\n or omitted, read all data until EOF is reached. The bytes are\n returned as a string object. An empty string is returned when EOF\n is encountered immediately. (For certain files, like ttys, it\n makes sense to continue reading after an EOF is hit.) Note that\n this method may call the underlying C function ``fread()`` more\n than once in an effort to acquire as close to *size* bytes as\n possible. Also note that when in non-blocking mode, less data than\n was requested may be returned, even if no *size* parameter was\n given.\n\n Note: This function is simply a wrapper for the underlying ``fread()``\n C function, and will behave the same in corner cases, such as\n whether the EOF value is cached.\n\nfile.readline([size])\n\n Read one entire line from the file. A trailing newline character\n is kept in the string (but may be absent when a file ends with an\n incomplete line). [5] If the *size* argument is present and non-\n negative, it is a maximum byte count (including the trailing\n newline) and an incomplete line may be returned. When *size* is not\n 0, an empty string is returned *only* when EOF is encountered\n immediately.\n\n Note: Unlike ``stdio``\'s ``fgets()``, the returned string contains null\n characters (``\'\\0\'``) if they occurred in the input.\n\nfile.readlines([sizehint])\n\n Read until EOF using ``readline()`` and return a list containing\n the lines thus read. If the optional *sizehint* argument is\n present, instead of reading up to EOF, whole lines totalling\n approximately *sizehint* bytes (possibly after rounding up to an\n internal buffer size) are read. Objects implementing a file-like\n interface may choose to ignore *sizehint* if it cannot be\n implemented, or cannot be implemented efficiently.\n\nfile.xreadlines()\n\n This method returns the same thing as ``iter(f)``.\n\n New in version 2.1.\n\n Deprecated since version 2.3: Use ``for line in file`` instead.\n\nfile.seek(offset[, whence])\n\n Set the file\'s current position, like ``stdio``\'s ``fseek()``. The\n *whence* argument is optional and defaults to ``os.SEEK_SET`` or\n ``0`` (absolute file positioning); other values are ``os.SEEK_CUR``\n or ``1`` (seek relative to the current position) and\n ``os.SEEK_END`` or ``2`` (seek relative to the file\'s end). There\n is no return value.\n\n For example, ``f.seek(2, os.SEEK_CUR)`` advances the position by\n two and ``f.seek(-3, os.SEEK_END)`` sets the position to the third\n to last.\n\n Note that if the file is opened for appending (mode ``\'a\'`` or\n ``\'a+\'``), any ``seek()`` operations will be undone at the next\n write. If the file is only opened for writing in append mode (mode\n ``\'a\'``), this method is essentially a no-op, but it remains useful\n for files opened in append mode with reading enabled (mode\n ``\'a+\'``). If the file is opened in text mode (without ``\'b\'``),\n only offsets returned by ``tell()`` are legal. Use of other\n offsets causes undefined behavior.\n\n Note that not all file objects are seekable.\n\n Changed in version 2.6: Passing float values as offset has been\n deprecated.\n\nfile.tell()\n\n Return the file\'s current position, like ``stdio``\'s ``ftell()``.\n\n Note: On Windows, ``tell()`` can return illegal values (after an\n ``fgets()``) when reading files with Unix-style line-endings. Use\n binary mode (``\'rb\'``) to circumvent this problem.\n\nfile.truncate([size])\n\n Truncate the file\'s size. If the optional *size* argument is\n present, the file is truncated to (at most) that size. The size\n defaults to the current position. The current file position is not\n changed. Note that if a specified size exceeds the file\'s current\n size, the result is platform-dependent: possibilities include that\n the file may remain unchanged, increase to the specified size as if\n zero-filled, or increase to the specified size with undefined new\n content. Availability: Windows, many Unix variants.\n\nfile.write(str)\n\n Write a string to the file. There is no return value. Due to\n buffering, the string may not actually show up in the file until\n the ``flush()`` or ``close()`` method is called.\n\nfile.writelines(sequence)\n\n Write a sequence of strings to the file. The sequence can be any\n iterable object producing strings, typically a list of strings.\n There is no return value. (The name is intended to match\n ``readlines()``; ``writelines()`` does not add line separators.)\n\nFiles support the iterator protocol. Each iteration returns the same\nresult as ``file.readline()``, and iteration ends when the\n``readline()`` method returns an empty string.\n\nFile objects also offer a number of other interesting attributes.\nThese are not required for file-like objects, but should be\nimplemented if they make sense for the particular object.\n\nfile.closed\n\n bool indicating the current state of the file object. This is a\n read-only attribute; the ``close()`` method changes the value. It\n may not be available on all file-like objects.\n\nfile.encoding\n\n The encoding that this file uses. When Unicode strings are written\n to a file, they will be converted to byte strings using this\n encoding. In addition, when the file is connected to a terminal,\n the attribute gives the encoding that the terminal is likely to use\n (that information might be incorrect if the user has misconfigured\n the terminal). The attribute is read-only and may not be present\n on all file-like objects. It may also be ``None``, in which case\n the file uses the system default encoding for converting Unicode\n strings.\n\n New in version 2.3.\n\nfile.errors\n\n The Unicode error handler used along with the encoding.\n\n New in version 2.6.\n\nfile.mode\n\n The I/O mode for the file. If the file was created using the\n ``open()`` built-in function, this will be the value of the *mode*\n parameter. This is a read-only attribute and may not be present on\n all file-like objects.\n\nfile.name\n\n If the file object was created using ``open()``, the name of the\n file. Otherwise, some string that indicates the source of the file\n object, of the form ``<...>``. This is a read-only attribute and\n may not be present on all file-like objects.\n\nfile.newlines\n\n If Python was built with universal newlines enabled (the default)\n this read-only attribute exists, and for files opened in universal\n newline read mode it keeps track of the types of newlines\n encountered while reading the file. The values it can take are\n ``\'\\r\'``, ``\'\\n\'``, ``\'\\r\\n\'``, ``None`` (unknown, no newlines read\n yet) or a tuple containing all the newline types seen, to indicate\n that multiple newline conventions were encountered. For files not\n opened in universal newline read mode the value of this attribute\n will be ``None``.\n\nfile.softspace\n\n Boolean that indicates whether a space character needs to be\n printed before another value when using the ``print`` statement.\n Classes that are trying to simulate a file object should also have\n a writable ``softspace`` attribute, which should be initialized to\n zero. This will be automatic for most classes implemented in\n Python (care may be needed for objects that override attribute\n access); types implemented in C will have to provide a writable\n ``softspace`` attribute.\n\n Note: This attribute is not used to control the ``print`` statement,\n but to allow the implementation of ``print`` to keep track of its\n internal state.\n',
14 'bltin-null-object': u"\nThe Null Object\n***************\n\nThis object is returned by functions that don't explicitly return a\nvalue. It supports no special operations. There is exactly one nul
27 'customization': u'\\nBasic customization\\n*******************\\n\\nobject.__new__(cls[, ...])\\n\\n Called to create a new instance of class *cls*. ``__new__()`` is a\\n static method (special-cased so you need not declare it as such)\\n that takes the class of which an instance was requested as its\\n first argument. The remaining arguments are those passed to the\\n object constructor expression (the call to the class). The return\\n value of ``__new__()`` should be the new object instance (usually\\n an instance of *cls*).\\n\\n Typical implementations create a new instance of the class by\\n invoking the superclass\\'s ``__new__()`` method using\\n ``super(currentclass, cls).__new__(cls[, ...])`` with appropriate\\n arguments and then modifying the newly-created instance as\\n necessary before returning it.\\n\\n If ``__new__()`` returns an instance of *cls*, then the new\\n instance\\'s ``__init__()`` method will be invoked like\\n ``__init__(self[, ...])``, where *self* is the new instance and the\\n remaining arguments are the same as were passed to ``__new__()``.\\n\\n If ``__new__()`` does not return an instance of *cls*, then the new\\n instance\\'s ``__init__()`` method will not be invoked.\\n\\n ``__new__()`` is intended mainly to allow subclasses of immutable\\n types (like int, str, or tuple) to customize instance creation. It\\n is also commonly overridden in custom metaclasses in order to\\n customize class creation.\\n\\nobject.__init__(self[, ...])\\n\\n Called when the instance is created. The arguments are those\\n passed to the class constructor expression. If a base class has an\\n ``__init__()`` method, the derived class\\'s ``__init__()`` method,\\n if any, must explicitly call it to ensure proper initialization of\\n the base class part of the instance; for example:\\n ``BaseClass.__init__(self, [args...])``. As a special constraint\\n on constructors, no value may be returned; doing so will cause a\\n ``TypeError`` to be raised at runtime.\\n\\nobject.__del__(self)\\n\\n Called when the instance is about to be destroyed. This is also\\n called a destructor. If a base class has a ``__del__()`` method,\\n the derived class\\'s ``__del__()`` method, if any, must explicitly\\n call it to ensure proper deletion of the base class part of the\\n instance. Note that it is possible (though not recommended!) for\\n the ``__del__()`` method to postpone destruction of the instance by\\n creating a new reference to it. It may then be called at a later\\n time when this new reference is deleted. It is not guaranteed that\\n ``__del__()`` methods are called for objects that still exist when\\n the interpreter exits.\\n\\n Note: ``del x`` doesn\\'t directly call ``x.__del__()`` --- the former\\n decrements the reference count for ``x`` by one, and the latter\\n is only called when ``x``\\'s reference count reaches zero. Some\\n common situations that may prevent the reference count of an\\n object from going to zero include: circular references between\\n objects (e.g., a doubly-linked list or a tree data structure with\\n parent and child pointers); a reference to the object on the\\n stack frame of a function that caught an exception (the traceback\\n stored in ``sys.exc_traceback`` keeps the stack frame alive); or\\n a reference to the object on the stack frame that raised an\\n unhandled exception in interactive mode (the traceback stored in\\n ``sys.last_traceback`` keeps the stack frame alive). The first\\n situation can only be remedied by explicitly breaking the cycles;\\n the latter two situations can be resolved by storing ``None`` in\\n ``sys.exc_traceback`` or ``sys.last_traceback``. Circular\\n references which are garbage are detected when the option cycle\\n detector is enabled (it\\'s on by default), but can only be cleaned\\n up if there are no Python-level ``__del__()`` methods involved.\\n Refer to the documentation for the ``gc`` module for more\\n information about how ``__del__()`` methods are handled by the\\n cycle detector, particularly the description of the ``garbage``\\n value.\\n\\n Warning: Due to the precarious circumstances under which ``__del__()``\\n methods are invoked, exceptions that occur during their execution\\n are ignored, and a warning is printed to ``sys.stderr`` instead.\\n Also, when ``__del__()`` is invoked in response to a module being\\n deleted (e.g., when execution of the program is done), other\\n globals referenced by the ``__del__()`` method may already have\\n been deleted or in the process of being torn down (e.g. the\\n import machinery shutting down). For this reason, ``__del__()``\\n methods should do the absolute minimum needed to maintain\\n external invariants. Starting with version 1.5, Python\\n guarantees that globals whose name begins with a single\\n underscore are deleted from their module before other globals are\\n deleted; if no other references to such globals exist, this may\\n help in assuring that imported modules are still available at the\\n time when the ``__del__()`` method is called.\\n\\nobject.__repr__(self)\\n\\n Called by the ``repr()`` built-in function and by string\\n conversions (reverse quotes) to compute the "official" string\\n representation of an object. If at all possible, this should look\\n like a valid Python expression that could be used to recreate an\\n object with the same value (given an appropriate environment). If\\n this is not possible, a string of the form ``<...some useful\\n description...>`` should be returned. The return value must be a\\n string object. If a class defines ``__repr__()`` but not\\n ``__str__()``, then ``__repr__()`` is also used when an "informal"\\n string representation of instances of that class is required.\\n\\n This is typically used for debugging, so it is important that the\\n representation is information-rich and unambiguous.\\n\\nobject.__str__(self)\\n\\n Called by the ``str()`` built-in function and by the ``print``\\n statement to compute the "informal" string representation of an\\n object. This differs from ``__repr__()`` in that it does not have\\n to be a valid Python expression: a more convenient or concise\\n representation may be used instead. The return value must be a\\n string object.\\n\\nobject.__lt__(self, other)\\nobject.__le__(self, other)\\nobject.__eq__(self, other)\\nobject.__ne__(self, other)\\nobject.__gt__(self, other)\\nobject.__ge__(self, other)\\n\\n New in version 2.1.\\n\\n These are the so-called "rich comparison" methods, and are called\\n for comparison operators in preference to ``__cmp__()`` below. The\\n correspondence between operator symbols and method names is as\\n follows: ``x<y`` calls ``x.__lt__(y)``, ``x<=y`` calls\\n ``x.__le__(y)``, ``x==y`` calls ``x.__eq__(y)``, ``x!=y`` and\\n ``x<>y`` call ``x.__ne__(y)``, ``x>y`` calls ``x.__gt__(y)``, and\\n ``x>=y`` calls ``x.__ge__(y)``.\\n\\n A rich comparison method may return the singleton\\n ``NotImplemented`` if it does not implement the operation for a\\n given pair of arguments. By convention, ``False`` and ``True`` are\\n returned for a successful comparison. However, these methods can\\n return any value, so if the comparison operator is used in a\\n Boolean context (e.g., in the condition of an ``if`` statement),\\n Python will call ``bool()`` on the value to determine if the result\\n is true or false.\\n\\n There are no implied relationships among the comparison operators.\\n The truth of ``x==y`` does not imply that ``x!=y`` is false.\\n Accordingly, when defining ``__eq__()``, one should also define\\n ``__ne__()`` so that the operators will behave as expected. See\\n the paragraph on ``__hash__()`` for some important notes on\\n creating *hashable* objects which support custom comparison\\n operations and are usable as dictionary keys.\\n\\n There are no swapped-argument versions of these methods (to be used\\n when the left argument does not support the operation but the right\\n argument does); rather, ``__lt__()`` and ``__gt__()`` are each\\n other\\'s reflection, ``__le__()`` and ``__ge__()`` are each other\\'s\\n reflection, and ``__eq__()`` and ``__ne__()`` are their own\\n reflection.\\n\\n Arguments to rich comparison methods are never coerced.\\n\\n To automatically generate ordering operations from a single root\\n operation, see ``functools.total_ordering()``.\\n\\nobject.__cmp__(self, other)\\n\\n Called by comparison operations if rich comparison (see above) is\\n not defined. Should return a negative integer if ``self < other``,\\n zero if ``self == other``, a positive integer if ``self > other``.\\n If no ``__cmp__()``, ``__eq__()`` or ``__ne__()`` operation is\\n defined, class instances are compared by object identity\\n ("address"). See also the description of ``__hash__()`` for some\\n important notes on creating *hashable* objects which support custom\\n comparison operations and are usable as dictionary keys. (Note: the\\n restriction that exceptions are not propagated by ``__cmp__()`` has\\n been removed since Python 1.5.)\\n\\nobject.__rcmp__(self, other)\\n\\n Changed in version 2.1: No longer supported.\\n\\nobject.__hash__(self)\\n\\n Called by built-in function ``hash()`` and for operations on\\n members of hashed collections including ``set``, ``frozenset``, and\\n ``dict``. ``__hash__()`` should return an integer. The only\\n required property is that objects which compare equal have the same\\n hash value; it is advised to somehow mix together (e.g. using\\n exclusive or) the hash values for the components of the object that\\n also play a part in comparison of objects.\\n\\n If a class does not define a ``__cmp__()`` or ``__eq__()`` method\\n it should not define a ``__hash__()`` operation either; if it\\n defines ``__cmp__()`` or ``__eq__()`` but not ``__hash__()``, its\\n instances will not be usable in hashed collections. If a class\\n defines mutable objects and implements a ``__cmp__()`` or\\n ``__eq__()`` method, it should not implement ``__hash__()``, since\\n hashable collection implementations require that a object\\'s hash\\n value is immutable (if the object\\'s hash value changes, it will be\\n in the wrong hash bucket).\\n\\n User-defined classes have ``__cmp__()`` and ``__hash__()`` methods\\n by default; with them, all objects compare unequal (except with\\n themselves) and ``x.__hash__()`` returns ``id(x)``.\\n\\n Classes which inherit a ``__hash__()`` method from a parent class\\n but change the meaning of ``__cmp__()`` or ``__eq__()`` such that\\n the hash value returned is no longer appropriate (e.g. by switching\\n to a value-based concept of equality instead of the default\\n identity based equality) can explicitly flag themselves as being\\n unhashable by setting ``__hash__ = None`` in the class definition.\\n Doing so means that not only will instances of the class raise an\\n appropriate ``TypeError`` when a program attempts to retrieve their\\n hash value, but they will also be correctly identified as\\n unhashable when checking ``isinstance(obj, collections.Hashable)``\\n (unlike classes which define their own ``__hash__()`` to explicitly\\n raise ``TypeError``).\\n\\n Changed in version 2.5: ``__hash__()`` may now also return a long\\n integer object; the 32-bit integer is then derived from the hash of\\n that object.\\n\\n Changed in version 2.6: ``__hash__`` may now be set to ``None`` to\\n explicitly flag instances of a class as unhashable.\\n\\nobject.__nonzero__(self)\\n\\n Called to implement truth value testing and the built-in operation\\n ``bool()``; should return ``False`` or ``True``, or their integer\\n equivalents ``0`` or ``1``. When this method is not defined,\\n ``__len__()`` is called, if it is defined, and the object is\\n considered true if its result is nonzero. If a class defines\\n neither ``__len__()`` nor ``__nonzero__()``, all its instances are\\n considered true.\\n\\nobject.__unicode__(self)\\n\\n Called to implement ``unicode()`` built-in; should return a Unicode\\n object. When this method is not defined, string conversion is\\n attempted, and the result of string conversion is converted to\\n Unicode using the system default encoding.\\n', namespace
31 'dynamic-features': u'\\nInteraction with dynamic features\\n*********************************\\n\\nThere are several cases where Python statements are illegal when used\\nin conjunction with nested scopes that contain free variables.\\n\\nIf a variable is referenced in an enclosing scope, it is illegal to\\ndelete the name. An error will be reported at compile time.\\n\\nIf the wild card form of import --- ``import *`` --- is used in a\\nfunction and the function contains or is a nested block with free\\nvariables, the compiler will raise a ``SyntaxError``.\\n\\nIf ``exec`` is used in a function and the function contains or is a\\nnested block with free variables, the compiler will raise a\\n``SyntaxError`` unless the exec explicitly specifies the local\\nnamespace for the ``exec``. (In other words, ``exec obj`` would be\\nillegal, but ``exec obj in ns`` would be legal.)\\n\\nThe ``eval()``, ``execfile()``, and ``input()`` functions and the\\n``exec`` statement do not have access to the full environment for\\nresolving names. Names may be resolved in the local and global\\nnamespaces of the caller. Free variables are not resolved in the\\nnearest enclosing namespace, but in the global namespace. [1] The\\n``exec`` statement and the ``eval()`` and ``execfile()`` functions\\nhave optional arguments to override the global and local namespace.\\nIf only one namespace is specified, it is used for both.\\n', namespace
[all...]
/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.2/Modules/
H A D_struct.c336 TYPE is one of char, byte, ubyte, etc.
1994 int one = 1; local
1997 if ((int)*(unsigned char*)&one)

Completed in 261 milliseconds

12