Improved unrecognized fields support, Python3 support in every file

Using parentheses around an expression does not change the output result in Python2.
So this modification keeps the same behaviour in Python2, and avoids syntax errors in Python3.