From 7ff839312ec2b5039b32f8bd1fe05e50bf370c2f Mon Sep 17 00:00:00 2001 From: Thomas Ballinger Date: Wed, 29 Oct 2014 00:57:37 -0400 Subject: [PATCH] fix wcswidth length argument behavior --- wcwidth/wcwidth.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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]: