title: Python 3 delete/reset variable created by decorator
body: <p>I am using Python 3.5 and i try to delete/reset a variable created by a decorator. When i try to reset/delete <code>calls</code> i got errors. I don't know what i am doing wrong. Maybe im calling not the correct instance of the function variable? To be honest i don't understand where the variable calls is located because of the output of the pdb.</p>
  
  <pre><code>import inspect
  
  def logWrapper(func):
    def wrapper_func(self, *args, **kwargs):
      wrapper_func.calls += 1
      print('Func: {}; Calls: {}' .format(func.__name__, wrapper_func.calls) )
      return func(self, *args, **kwargs)
    wrapper_func.calls=0
  
    return wrapper_func
  
  
  class A:
  
    def __init__(self):
      print('created')
  
    @logWrapper
    def myfunction1(self, var1):
      print('var1: {}' .format(var1))
  
    @logWrapper
    def myfunction2(self, var2):
      print('var2: {}' .format(var2))  
  
  if __name__ == "__main__":   
    Pal1=A()
    Pal1.myfunction1('1')
    Pal1.myfunction1('2')
    Pal1.myfunction1('3')
    Pal1.myfunction2('A')
  
    function_list=inspect.getmembers(Pal1, predicate=inspect.ismethod)
    for func in function_list:
      method_to_call = getattr(Pal1, func[0])
      try:
        #try to call attribute calls if exist otherwise next function
        print( 'Result-&gt; Function: {}; Calls: {}' .format(func[0], method_to_call.calls))
      except AttributeError:
        continue
  
      #Here: Only when no Exception occured
      method_to_call.calls = 0
      #del method_to_call.calls
  
    Pal1.myfunction1('X')
    Pal1.myfunction1('Y')
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>created
  Func: myfunction1; Calls: 1
  var1: 1
  Func: myfunction1; Calls: 2
  var1: 2
  Func: myfunction1; Calls: 3
  var1: 3
  Func: myfunction2; Calls: 1
  var2: A
  Result-&gt; Function: myfunction1; Calls: 3
  Traceback (most recent call last):
    File "tt1.py", line 41, in &lt;module&gt;
      method_to_call.calls = 0
  AttributeError: 'method' object has no attribute 'calls'
  </code></pre>
  
  <p>PDB shows me:</p>
  
  <pre><code>(Pdb) method_to_call
  &lt;bound method A.__init__ of &lt;__main__.A object at 0x022EF6B0&gt;&gt;
  (Pdb) method_to_call
  &lt;bound method logWrapper.&lt;locals&gt;.wrapper_func of &lt;__main__.A object at 0x022EF6B0&gt;&gt;
  </code></pre>