class documentation
class TypeVarLikeScope: (source)
Scope that holds bindings for type variables and parameter specifications. Node fullname -> TypeVarLikeType.
Method | __init__ |
Initializer for TypeVarLikeScope |
Method | __str__ |
Undocumented |
Method | allow |
Undocumented |
Method | bind |
Undocumented |
Method | bind |
Undocumented |
Method | class |
A new scope frame for binding a class. Prohibits *this* class's tvars |
Method | get |
Undocumented |
Method | get |
Get the nearest parent that's a function scope, not a class scope |
Method | method |
A new scope frame for binding a method |
Method | new |
Used by plugin-like code that needs to make synthetic generic functions. |
Instance Variable | class |
Undocumented |
Instance Variable | func |
Undocumented |
Instance Variable | is |
Undocumented |
Instance Variable | namespace |
Undocumented |
Instance Variable | parent |
Undocumented |
Instance Variable | prohibited |
Undocumented |
Instance Variable | scope |
Undocumented |
def __init__(self, parent:
TypeVarLikeScope|None
= None, is_class_scope: bool
= False, prohibited: TypeVarLikeScope|None
= None, namespace: str
= ''):
(source)
¶
Initializer for TypeVarLikeScope Parameters: parent: the outer scope for this scope is_class_scope: True if this represents a generic class prohibited: Type variables that aren't strictly in scope exactly, but can't be bound because they're part of an outer class's scope.