Minor optimizations

This commit is contained in:
Miroslav Stampar
2025-12-25 22:15:06 +01:00
parent 7a21109ad0
commit bcabe55fc3
5 changed files with 10 additions and 7 deletions

View File

@@ -472,7 +472,7 @@ def getConsoleLength(value):
"""
if isinstance(value, six.text_type):
retVal = sum((2 if ord(_) >= 0x3000 else 1) for _ in value)
retVal = len(value) + sum(ord(_) >= 0x3000 for _ in value)
else:
retVal = len(value)