我有一个函数,它将把python列表写成各种格式。csv是我想要写的格式之一。我知道我使用内置的csv Python模块,但我的函数目前是以以下方式编写的: if save_to is None:print self.my_listwriter = csv.writer(open('test.csv','w'
function a(){ }我将它实例化为:$O->a() ->a();
在最后一个函数->a()中,有什么方法可以知道它以前被调用了多少次吗?因此,我可以像'method ->a() has been called twice before this.'一样输出--我想找出这一点,而不用像声明一个属性那样使用增量