Revert "make the locale_flag fallback code work again (#375)" (#387)
This reverts commit 43f5df5bfaea5a07c913d12cb92f78f997feb371.
diff --git a/Lib/test/test_re.py b/Lib/test/test_re.py
index a195320..92d2c13 100644
--- a/Lib/test/test_re.py
+++ b/Lib/test/test_re.py
@@ -1400,8 +1400,6 @@
def test_locale_flag(self):
import locale
enc = locale.getpreferredencoding(False)
- bletter = None
- bpat = b'A'
# Search non-ASCII letter
for i in range(128, 256):
try:
@@ -1415,6 +1413,9 @@
break
except (UnicodeError, TypeError):
pass
+ else:
+ bletter = None
+ bpat = b'A'
# Bytes patterns
pat = re.compile(bpat, re.LOCALE | re.IGNORECASE)
if bletter: