Adjusting syntax to support single Py2/3 source.

Fixed issue #381.