本文整理汇总了Python中transform.Transform.transform_Assign方法的典型用法代码示例。如果您正苦于以下问题:Python Transform.transform_Assign方法的具体用法?Python Transform.transform_Assign怎么用?Python Transform.transform_Assign使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类transform.Transform
的用法示例。
在下文中一共展示了Transform.transform_Assign方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: transform_Assign
# 需要导入模块: from transform import Transform [as 别名]
# 或者: from transform.Transform import transform_Assign [as 别名]
def transform_Assign(self, stmt):
"""
If you encounter an adverb being written to an output location,
then why not just use that as the output directly?
"""
if stmt.lhs.__class__ is Index:
rhs_class = stmt.rhs.__class__
if rhs_class is Map:
self.transform_Map(stmt.rhs, output=stmt.lhs)
return None
elif rhs_class is OuterMap:
self.transform_OuterMap(stmt.rhs, output=stmt.lhs)
return Transform.transform_Assign(self, stmt)
示例2: transform_Assign
# 需要导入模块: from transform import Transform [as 别名]
# 或者: from transform.Transform import transform_Assign [as 别名]
def transform_Assign(self, stmt):
if stmt.lhs.__class__ is Index and isinstance(stmt.rhs, Map):
self.transform_Map(stmt.rhs, output = stmt.lhs)
return None
return Transform.transform_Assign(self, stmt)
示例3: transform_Assign
# 需要导入模块: from transform import Transform [as 别名]
# 或者: from transform.Transform import transform_Assign [as 别名]
def transform_Assign(self, stmt):
result = Transform.transform_Assign(self, stmt )
if result.lhs.__class__ is Var:
self.seen_binding.add(result.lhs.name)
return result