Add backwards compatibility broken by PR #251
camclean opened this issue · 3 comments
I added this because this module is designed for code compatible on Python 2 and 3. Tested it with and without that line, works with both in python 2.7 for me, though I guess you got the errors along the lines that there is nomodule named builtins? For python 2 it should be installed, though at least CMSSW_10_2_10 it worked without any additional installation. Until (probably) nobody is using this with python3, I guess it can be commented out.
I'm using an older version (94X) of CMSSW (and I suspect that some older analyses that are finishing up will, too). I did in fact get the error saying no module named builtins. I would suggest adding something like the following lines:
import sys
if '2.' not in sys.version: from builtins import zip
this has been fixed in 255