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: 
Yep, but the difference is marginal.

```
>>> timeit.Timer('x += 1', 'x = 0').timeit(10**8)
5.7387330532073975
>>> timeit.Timer('x = x + 1', 'x = 0').timeit(10**8)
6.04801607131958
>>> timeit.Timer('x += 1', 'x = 0').timeit(10**8)
5.790481090545654
>>> timeit.Timer('x = x + 1', 'x = 0').timeit(10**8)
6.083467960357666

```
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)

```