diff --git a/wcwidth/wcwidth.py b/wcwidth/wcwidth.py index 1df34b1..d7fe1db 100644 --- a/wcwidth/wcwidth.py +++ b/wcwidth/wcwidth.py @@ -176,7 +176,7 @@ def wcswidth(pwcs, n=None): (default), return the length of the entire string. """ - end = len(pwcs) if n is not None else n + end = len(pwcs) if n is None else n idx = slice(0, end) width = 0 for char in pwcs[idx]: