This module contains the classes for "scoped" node, i.e. which are opening a new local scope in the language definition : Module, ClassDef, FunctionDef (and Lambda, GeneratorExp, DictComp and SetComp to some extent).
Function | clean |
Undocumented |
Function | clean |
A class can inherit from typing.Generic directly, as base, and as base of bases. The merged MRO must however only contain the last entry. To prepare for _c3_merge, remove some typing.Generic entries from sequences if multiple are present. |
Constant | BUILTIN |
Undocumented |
Constant | EXCEPTION |
Undocumented |
Constant | ITER |
Undocumented |
Type Variable | T |
Undocumented |
Variable | objects |
Undocumented |
Class | _ |
Class representing an ast.ListComp node. |
Function | _c3 |
Merges MROs in sequences to a single MRO using the C3 algorithm. |
Function | _class |
return a ClassDef node type to differ metaclass and exception from 'regular' classes |
Function | _infer |
Detect decorator call chaining and see if the end result is a static or a classmethod. |
Function | _rec |
return a list of all argument names |
A class can inherit from typing.Generic directly, as base, and as base of bases. The merged MRO must however only contain the last entry. To prepare for _c3_merge, remove some typing.Generic entries from sequences if multiple are present.
This method will check if Generic is in inferred_bases and also part of bases_mro. If true, remove it from inferred_bases as well as its entry the bases_mro.
Format sequences: [[self]] + bases_mro + [inferred_bases]
Undocumented
Value |
|
Merges MROs in sequences to a single MRO using the C3 algorithm.
Adapted from http://www.python.org/download/releases/2.3/mro/.