Question: I'm not sure whether it's the same in Python.

Has anyone tried that before?

<http://docs.python.org/library/operator#operator.iadd>

Answer: 
Nope

```
>>> bar = timeit.Timer("a += 1", "a = 0")
>>> bar.timeit(number=1000000)
0.064391136169433594
>>> bar = timeit.Timer("a = a + 1", "a = 0")
>>> bar.timeit(number=1000000)
0.064393997192382812
>>>

```
I took a slightly different approach using the `cProfile` module:

```
$ python -m cProfile test.py 
     4 function calls in 0.397 seconds

Ordered by: standard name

   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
        1    0.000    0.000    0.397    0.397 test.py:2(<module>)
        1    0.205    0.205    0.205    0.205 test.py:2(add1)
        1    0.192    0.192    0.192    0.192 test.py:6(add2)
        1    0.000    0.000    0.000    0.000 {method 'disable' of '_lsprof.Profiler' objects}

aaron@zebrafish:~/pyad$ cat test.py 
def add1(a):
    for x in xrange(10 ** 6):
        a += 1

def add2(a):
    for x in xrange(10 ** 6):
        a = a + 1

add1(0)
add2(0)

```

After about 20 runs I would conclude that add2 (using `a = a + 1`) was very slightly faster, but not in all cases (perhaps try it with a greater number of loops). This is probably not the best heuristic, but I figure a greater number of repetitions with larger and larger numbers should indicate a performance difference.

EDIT - results for 10 \*\* 9 calls:

```
    1  216.119  216.119  216.119  216.119 test.py:2(add1)
    1  195.364  195.364  195.364  195.364 test.py:6(add2)

```