[meta-python] Simplify Var ctor since it never is given a typevar argument;
This commit is contained in:
@@ -162,19 +162,19 @@ class Var(Atom):
|
|||||||
Values that are defined only in the destination pattern.
|
Values that are defined only in the destination pattern.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, name, typevar=None):
|
def __init__(self, name):
|
||||||
# type: (str, TypeVar) -> None
|
# type: (str) -> None
|
||||||
self.name = name
|
self.name = name
|
||||||
# The `Def` defining this variable in a source pattern.
|
# The `Def` defining this variable in a source pattern.
|
||||||
self.src_def = None # type: Def
|
self.src_def = None # type: Def
|
||||||
# The `Def` defining this variable in a destination pattern.
|
# The `Def` defining this variable in a destination pattern.
|
||||||
self.dst_def = None # type: Def
|
self.dst_def = None # type: Def
|
||||||
# TypeVar representing the type of this variable.
|
# TypeVar representing the type of this variable.
|
||||||
self.typevar = typevar # type: TypeVar
|
self.typevar = None # type: TypeVar
|
||||||
# The original 'typeof(x)' type variable that was created for this Var.
|
# The original 'typeof(x)' type variable that was created for this Var.
|
||||||
# This one doesn't change. `self.typevar` above may be changed to
|
# This one doesn't change. `self.typevar` above may be changed to
|
||||||
# another typevar by type inference.
|
# another typevar by type inference.
|
||||||
self.original_typevar = self.typevar # type: TypeVar
|
self.original_typevar = None # type: TypeVar
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
# type: () -> str
|
# type: () -> str
|
||||||
|
|||||||
Reference in New Issue
Block a user