xrange is called 'range' in python3, change is python2 compatible

Since _fields is statically set just before this to a small, finite list there is no problem using the 'range' (returns a list) in python 2, while in python 3 it will return an iterator object (i.e. what xrange does in python 2).