class mutable_pseudoint(object):

    def __init__(self, d):
        self.d = d

def __iadd__(self, v):
    self.d += v

def __repr__(self):
    return self.d.__repr__()

def __str__(self):
    return self.d.__str__()
l = [mutable_pseudoint(1), mutable_pseudoint(2), mutable_pseudoint(3),
    mutable_pseudoint(4)]
l
for k, v in enumerate(l):
    v += 1
l
Python-эквивалент php foreach($array as $key => &$value)