class documentation
class CollapseLongUnions(visitors.Visitor): (source)
Shortens long unions to object (or "?"). Poor man's version of FindCommonSuperClasses. Shorten types like "str or unicode or int or float or list" to just "object" or "?". Additionally, if the union already contains at least one "object", we also potentially replace the entire union with just "object". Attributes: max_length: The maximum number of types to allow in a union. If there are more types than this, it is shortened.
Method | __init__ |
Undocumented |
Method |
|
Undocumented |
Instance Variable | generic |
Undocumented |
Instance Variable | max |
Undocumented |
Inherited from Visitor
:
Method |
|
Undocumented |
Method |
|
Undocumented |
Method |
|
Undocumented |
Class Variable | old |
Undocumented |
Class Variable | unchecked |
Undocumented |
Class Variable | visits |
Undocumented |
Instance Variable | enter |
Undocumented |
Instance Variable | leave |
Undocumented |
Instance Variable | visit |
Undocumented |
Instance Variable | visit |
Undocumented |
Class Variable | _visitor |
Undocumented |