Fix use of range as list.

main
Olivier Mangin 11 years ago
parent bf2cce1c13
commit 8136e0906e

@ -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]'

@ -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()

Loading…
Cancel
Save