From 8b16f7e62ac8a0191872583e30fb1225f70f7807 Mon Sep 17 00:00:00 2001 From: Hongbo <12580159+ya0guang@users.noreply.github.com> Date: Fri, 29 Mar 2024 17:32:36 -0400 Subject: [PATCH] Fix an logic error in stardict.py --- stardict.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stardict.py b/stardict.py index 6dbef71..eb5cb92 100644 --- a/stardict.py +++ b/stardict.py @@ -1730,8 +1730,8 @@ class DictHelper (object): return False if len(word) == 1: x = ord(word) - if (x < ord('a')) and (x > ord('z')): - if (x < ord('A')) and (x > ord('Z')): + if (x < ord('a')) or (x > ord('z')): + if (x < ord('A')) or (x > ord('Z')): return False if (' ' not in word) and ('-' not in word): if ('?' in word) or ('!' in word):