Karthikeyan Singaravelan <tir.kar...@gmail.com> added the comment:

Is it something specific to the environment? I tried the test on Ubuntu 16.04 
on both master and on v3.6.3 with no errors. Maybe if you can execute the 
following code based on which the test is executed then it will be helpful to 
debug this.


import locale

foo, enc = locale.getlocale(locale.LC_CTYPE)
# Search non-ASCII letter
for i in range(128, 256):
    try:
        c = bytes([i]).decode(enc)
        sletter = c.lower()
        if sletter == c: continue
        bletter = sletter.encode(enc)
        if len(bletter) != 1: continue
        if bletter.decode(enc) != sletter: continue
        bpat = re.escape(bytes([i]))
        break
    except (UnicodeError, TypeError):
        pass
else:
    bletter = None
    bpat = b'A'
# Bytes patterns

print(bletter)
print(bpat)
print(foo)
print(enc)



Thanks

----------
nosy: +xtreak

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue32080>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to