Q:

IronPython indexer parameter compilation error

I am pretty new to IronPython. And I have a question about accessing element by indexer. For example in C# we can write something like this: 

But when I try to do in IronPython something equivalent:

It tells me that there is "unexpected token '+='". I used '+=' increment operation because there is no such post-increment operation '++' in IronPython. I am using IronPython 2.7.
Can anyone help me with this? What should I change to make my IronPython code compile and keep functionality the same? 

A:

Python prevents that kind of side effect syntax.
No way around this: you have to do:
rval = ints[index]
index += 1
return rval

or
index += 1
return ints[index-1]

