コード例 #1
0
ファイル: heap.py プロジェクト: hellozhaojian/CORGI
    def newvar(self, name=None):
        """ Make a new variable. Should return a Var instance, possibly with
        interesting attributes set that e.g. add_trail can inspect."""

        if (name == None):
            raise Error("ERROR BindingVar has no name")

        result = BindingVar(name)
        result.created_after_choice_point = self
        return result
コード例 #2
0
 def newvar(self):
     """ Make a new variable. Should return a Var instance, possibly with
     interesting attributes set that e.g. add_trail can inspect."""
     result = BindingVar()
     result.created_after_choice_point = self
     return result
コード例 #3
0
ファイル: heap.py プロジェクト: cosmoharrigan/pyrolog
 def newvar(self):
     """ Make a new variable. Should return a Var instance, possibly with
     interesting attributes set that e.g. add_trail can inspect."""
     result = BindingVar()
     result.created_after_choice_point = self
     return result