diff --git a/pubs/bibstruct.py b/pubs/bibstruct.py index c8f942a..ee98b10 100644 --- a/pubs/bibstruct.py +++ b/pubs/bibstruct.py @@ -5,7 +5,8 @@ from .p3 import ustr, unichr # citekey stuff -CONTROL_CHARS = ''.join(map(unichr, range(0, 32) + range(127, 160))) +CONTROL_CHARS = ''.join(map(unichr, + list(range(0, 32)) + list(range(127, 160)))) CITEKEY_FORBIDDEN_CHARS = '@\'\\,#}{~%/' # '/' is OK for bibtex but forbidden # here since we transform citekeys into filenames CITEKEY_EXCLUDE_RE = re.compile('[%s]' diff --git a/tests/test_color.py b/tests/test_color.py index 58ba672..0590ecf 100644 --- a/tests/test_color.py +++ b/tests/test_color.py @@ -1,10 +1,12 @@ import dotdot from pubs import color + def perf_color(): - s = str(range(1000)) + s = str(list(range(1000))) for _ in range(5000000): color.dye(s, color.red) + if __name__ == '__main__': perf_color()