Skip to content

Commit

Permalink
fix wcswidth length argument behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasballinger committed Oct 29, 2014
1 parent 8c17624 commit 7ff8393
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion wcwidth/wcwidth.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]:
Expand Down

0 comments on commit 7ff8393

Please sign in to comment.