コード例 #1
0
ファイル: test_ir.py プロジェクト: toddrme2178/numba
 def test_delattr(self):
     a = ir.DelAttr(self.var_a, 'foo', self.loc1)
     b = ir.DelAttr(self.var_a, 'foo', self.loc1)
     c = ir.DelAttr(self.var_a, 'foo', self.loc2)
     d = ir.DelAttr(self.var_c, 'foo', self.loc1)
     e = ir.DelAttr(self.var_a, 'bar', self.loc1)
     self.check(a, same=[b, c], different=[d, e])
コード例 #2
0
ファイル: interpreter.py プロジェクト: smtlify/numba
 def op_DELETE_ATTR(self, inst, target):
     attr = self.code_names[inst.arg]
     sa = ir.DelAttr(target=self.get(target), attr=attr, loc=self.loc)
     self.current_block.append(sa)