# Autogenerated by Sphinx on Sun Dec 23 16:24:21 2018
topics = {'assert': 'The "assert" statement\n'
'**********************\n'
'Assert statements are a convenient way to insert debugging '
' assert_stmt ::= "assert" expression ["," expression]\n'
'The simple form, "assert expression", is equivalent to\n'
' if not expression: raise AssertionError\n'
'The extended form, "assert expression1, expression2", is '
' if not expression1: raise AssertionError(expression2)\n'
'These equivalences assume that "__debug__" and "AssertionError" '
'to the built-in variables with those names. In the current\n'
'implementation, the built-in variable "__debug__" is "True" under\n'
'normal circumstances, "False" when optimization is requested '
'line option "-O"). The current code generator emits no code for '
'assert statement when optimization is requested at compile time. '
'that it is unnecessary to include the source code for the '
'that failed in the error message; it will be displayed as part of '
'Assignments to "__debug__" are illegal. The value for the '
'variable is determined when the interpreter starts.\n',
'assignment': 'Assignment statements\n'
'*********************\n'
'Assignment statements are used to (re)bind names to values and '
'modify attributes or items of mutable objects:\n'
' assignment_stmt ::= (target_list "=")+ (starred_expression '
' target_list ::= target ("," target)* [","]\n'
' target ::= identifier\n'
' | "(" [target_list] ")"\n'
' | "[" [target_list] "]"\n'
'(See section Primaries for the syntax definitions for '
'*subscription*, and *slicing*.)\n'
'An assignment statement evaluates the expression list '
'this can be a single expression or a comma-separated list, the '
'yielding a tuple) and assigns the single resulting object to '
'the target lists, from left to right.\n'
'Assignment is defined recursively depending on the form of the '
'(list). When a target is part of a mutable object (an '
'reference, subscription or slicing), the mutable object must\n'
'ultimately perform the assignment and decide about its '
'may raise an exception if the assignment is unacceptable. The '
'observed by various types and the exceptions raised are given '
'definition of the object types (see section The standard type\n'
'Assignment of an object to a target list, optionally enclosed '
'parentheses or square brackets, is recursively defined as '
'* If the target list is a single target with no trailing '
' optionally in parentheses, the object is assigned to that '
'* Else: The object must be an iterable with the same number of '
' as there are targets in the target list, and the items are '
' from left to right, to the corresponding targets.\n'
' * If the target list contains one target prefixed with an\n'
' asterisk, called a “starred” target: The object must be '
' iterable with at least as many items as there are targets '
' target list, minus one. The first items of the iterable '
' assigned, from left to right, to the targets before the '
' target. The final items of the iterable are assigned to '
' targets after the starred target. A list of the remaining '
' in the iterable is then assigned to the starred target '
' * Else: The object must be an iterable with the same number '
' items as there are targets in the target list, and the '
' assigned, from left to right, to the corresponding '
'Assignment of an object to a single target is recursively '
'* If the target is an identifier (name):\n'
' * If the name does not occur in a "global" or "nonlocal" '
' in the current code block: the name is bound to the object '
' current local namespace.\n'
' * Otherwise: the name is bound to the object in the global\n'
' namespace or the outer namespace determined by '
' The name is rebound if it was already bound. This may cause '
' reference count for the object previously bound to the name '
' zero, causing the object to be deallocated and its '
' has one) to be called.\n'
'* If the target is an attribute reference: The primary '
' the reference is evaluated. It should yield an object with\n'
' assignable attributes; if this is not the case, "TypeError" '
' raised. That object is then asked to assign the assigned '
' the given attribute; if it cannot perform the assignment, it '
' an exception (usually but not necessarily '
' Note: If the object is a class instance and the attribute '
' occurs on both sides of the assignment operator, the RHS '
' "a.x" can access either an instance attribute or (if no '
' attribute exists) a class attribute. The LHS target "a.x" '
' set as an instance attribute, creating it if necessary. '
' two occurrences of "a.x" do not necessarily refer to the '
' attribute: if the RHS expression refers to a class '
' LHS creates a new instance attribute as the target of the\n'
' x = 3 # class variable\n'
' inst.x = inst.x + 1 # writes inst.x as 4 leaving Cls.x '
' This description does not necessarily apply to descriptor\n'
' attributes, such as properties created with "property()".\n'
'* If the target is a subscription: The primary expression in '
' reference is evaluated. It should yield either a mutable '
' object (such as a list) or a mapping object (such as a '
' Next, the subscript expression is evaluated.\n'
' If the primary is a mutable sequence object (such as a '
' subscript must yield an integer. If it is negative, the '
' length is added to it. The resulting value must be a '
' integer less than the sequence’s length, and the sequence is '
' to assign the assigned object to its item with that index. '
' index is out of range, "IndexError" is raised (assignment to '
' subscripted sequence cannot add new items to a list).\n'
' If the primary is a mapping object (such as a dictionary), '
' subscript must have a type compatible with the mapping’s key '
' and the mapping is then asked to create a key/datum pair '
' the subscript to the assigned object. This can either '
' existing key/value pair with the same key value, or insert a '
' key/value pair (if no key with the same value existed).\n'
' For user-defined objects, the "__setitem__()" method is '
' appropriate arguments.\n'
'* If the target is a slicing: The primary expression in the\n'
' reference is evaluated. It should yield a mutable sequence '
' (such as a list). The assigned object should be a sequence '
' of the same type. Next, the lower and upper bound '
' evaluated, insofar they are present; defaults are zero and '
' sequence’s length. The bounds should evaluate to integers. '
' either bound is negative, the sequence’s length is added to '
' resulting bounds are clipped to lie between zero and the '
' length, inclusive. Finally, the sequence object is asked to '
' the slice with the items of the assigned sequence. The '
' the slice may be different from the length of the assigned '
' thus changing the length of the target sequence, if the '
'**CPython implementation detail:** In the current '
'syntax for targets is taken to be the same as for expressions, '
'invalid syntax is rejected during the code generation phase, '
'less detailed error messages.\n'
'Although the definition of assignment implies that overlaps '
'the left-hand side and the right-hand side are ‘simultaneous’ '
'example "a, b = b, a" swaps two variables), overlaps *within* '
'collection of assigned-to variables occur left-to-right, '
'resulting in confusion. For instance, the following program '
' i, x[i] = 1, 2 # i is updated, then x[i] is '
' **PEP 3132** - Extended Iterable Unpacking\n'
' The specification for the "*target" feature.\n'
'Augmented assignment statements\n'
'===============================\n'
'Augmented assignment is the combination, in a single '
'binary operation and an assignment statement:\n'
' augmented_assignment_stmt ::= augtarget augop '
'(expression_list | yield_expression)\n'
' augtarget ::= identifier | attributeref | '
'subscription | slicing\n'
' augop ::= "+=" | "-=" | "*=" | "@=" | '
'"/=" | "//=" | "%=" | "**="\n'
' | ">>=" | "<<=" | "&=" | "^=" | "|="\n'
'(See section Primaries for the syntax definitions of the last '
'An augmented assignment evaluates the target (which, unlike '
'assignment statements, cannot be an unpacking) and the '
'list, performs the binary operation specific to the type of '
'on the two operands, and assigns the result to the original '
'The target is only evaluated once.\n'
'An augmented assignment expression like "x += 1" can be '
'"x = x + 1" to achieve a similar, but not exactly equal '
'augmented version, "x" is only evaluated once. Also, when '
'the actual operation is performed *in-place*, meaning that '
'creating a new object and assigning that to the target, the '
'Unlike normal assignments, augmented assignments evaluate the '
'hand side *before* evaluating the right-hand side. For '
'+= f(x)" first looks-up "a[i]", then it evaluates "f(x)" and '
'the addition, and lastly, it writes the result back to '
'With the exception of assigning to tuples and multiple targets '
'single statement, the assignment done by augmented assignment\n'
'statements is handled the same way as normal assignments. '
'with the exception of the possible *in-place* behavior, the '
'operation performed by augmented assignment is the same as the '
'For targets which are attribute references, the same caveat '
'class and instance attributes applies as for regular '
'Annotated assignment statements\n'
'===============================\n'
'Annotation assignment is the combination, in a single '
'variable or attribute annotation and an optional assignment '
' annotated_assignment_stmt ::= augtarget ":" expression ["=" '
'The difference from normal Assignment statements is that only '
'target and only single right hand side value is allowed.\n'
'For simple names as assignment targets, if in class or module '
'the annotations are evaluated and stored in a special class or '
'attribute "__annotations__" that is a dictionary mapping from '
'names (mangled if private) to evaluated annotations. This '
'writable and is automatically created at the start of class or '
'body execution, if annotations are found statically.\n'
'For expressions as assignment targets, the annotations are '
'if in class or module scope, but not stored.\n'
'If a name is annotated in a function scope, then this name is '
'for that scope. Annotations are never evaluated and stored in '
'If the right hand side is present, an annotated assignment '
'the actual assignment before evaluating annotations (where\n'
'applicable). If the right hand side is not present for an '
'target, then the interpreter evaluates the target except for '
'"__setitem__()" or "__setattr__()" call.\n'
' **PEP 526** - Syntax for Variable Annotations\n'
' The proposal that added syntax for annotating the types '
' variables (including class variables and instance '
' instead of expressing them through comments.\n'
' **PEP 484** - Type hints\n'
' The proposal that added the "typing" module to provide a '
' syntax for type annotations that can be used in static '
'atom-identifiers': 'Identifiers (Names)\n'
'An identifier occurring as an atom is a name. See '
'and keywords for lexical definition and section Naming '
'documentation of naming and binding.\n'
'When the name is bound to an object, evaluation of the '
'that object. When a name is not bound, an attempt to '
'raises a "NameError" exception.\n'
'**Private name mangling:** When an identifier that '
'a class definition begins with two or more underscore '
'does not end in two or more underscores, it is '
'considered a *private\n'
'name* of that class. Private names are transformed to a '
'before code is generated for them. The transformation '
'class name, with leading underscores removed and a '
'inserted, in front of the name. For example, the '
'occurring in a class named "Ham" will be transformed to '
'This transformation is independent of the syntactical '
'the identifier is used. If the transformed name is '
'(longer than 255 characters), implementation defined '
'happen. If the class name consists only of underscores, '
'transformation is done.\n',
'atom-literals': 'Literals\n'
'Python supports string and bytes literals and various '
' literal ::= stringliteral | bytesliteral\n'
' | integer | floatnumber | imagnumber\n'
'Evaluation of a literal yields an object of the given type '
'bytes, integer, floating point number, complex number) with '
'value. The value may be approximated in the case of '
'and imaginary (complex) literals. See section Literals for '
'All literals correspond to immutable data types, and hence '
'object’s identity is less important than its value. '
'evaluations of literals with the same value (either the '
'occurrence in the program text or a different occurrence) '
'the same object or a different object with the same '
'attribute-access': 'Customizing attribute access\n'
'****************************\n'
'The following methods can be defined to customize the '
'attribute access (use of, assignment to, or deletion of '
'object.__getattr__(self, name)\n'
' Called when the default attribute access fails with '
' "AttributeError" (either "__getattribute__()" raises '
' "AttributeError" because *name* is not an instance '
' attribute in the class tree for "self"; or '
'"__get__()" of a *name*\n'
' property raises "AttributeError"). This method '