Help! Unexpectet script behavior while counting.

import bpy
def callTest(own, DoNotCountThis):

…if not “CountThis” in own:
…own[“CountThis”] = DoNotCountThis
…own[“CountThis”][0] += 1

…print (own[“CountThis”],DoNotCountThis )

def bugTest(cont):
…if not “DoNotCountThis” in own:
…own[“DoNotCountThis”] = [1,1]

callTest(own, own["DoNotCountThis"])  This is a module to explain what I suppose is a bug. The script should only count the first index of own["CountThis"], but instead counts both variables. Or do i something wrong here? The module bugTest is called from game engine repeatedly.


BugTest.blend (468 KB)