##// END OF EJS Templates
ui: construct _keepalnum list in a python3-friendly way...
Augie Fackler -
r31014:219629d4 default
parent child Browse files
Show More
@@ -39,7 +39,12 b' from . import ('
39 urlreq = util.urlreq
39 urlreq = util.urlreq
40
40
41 # for use with str.translate(None, _keepalnum), to keep just alphanumerics
41 # for use with str.translate(None, _keepalnum), to keep just alphanumerics
42 _keepalnum = ''.join(c for c in map(chr, range(256)) if not c.isalnum())
42 if pycompat.ispy3:
43 _bytes = [bytes([c]) for c in range(256)]
44 _notalnum = [s for s in _bytes if not s.isalnum()]
45 else:
46 _notalnum = [c for c in map(chr, range(256)) if not c.isalnum()]
47 _keepalnum = ''.join(_notalnum)
43
48
44 samplehgrcs = {
49 samplehgrcs = {
45 'user':
50 'user':
General Comments 0
You need to be logged in to leave comments. Login now