Fix use of range as list.
This commit is contained in:
parent
bf2cce1c13
commit
8136e0906e
@ -5,7 +5,8 @@ from .p3 import ustr, unichr
|
|||||||
|
|
||||||
# citekey stuff
|
# 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
|
CITEKEY_FORBIDDEN_CHARS = '@\'\\,#}{~%/' # '/' is OK for bibtex but forbidden
|
||||||
# here since we transform citekeys into filenames
|
# here since we transform citekeys into filenames
|
||||||
CITEKEY_EXCLUDE_RE = re.compile('[%s]'
|
CITEKEY_EXCLUDE_RE = re.compile('[%s]'
|
||||||
|
@ -1,10 +1,12 @@
|
|||||||
import dotdot
|
import dotdot
|
||||||
from pubs import color
|
from pubs import color
|
||||||
|
|
||||||
|
|
||||||
def perf_color():
|
def perf_color():
|
||||||
s = str(range(1000))
|
s = str(list(range(1000)))
|
||||||
for _ in range(5000000):
|
for _ in range(5000000):
|
||||||
color.dye(s, color.red)
|
color.dye(s, color.red)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
perf_color()
|
perf_color()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user