Chris Angelico added the comment:
And of course, I make a copy/paste error in a trivial piece of example code.
def str_width(s):
width=1
for ch in map(ord,s):
if ch > 0xFFFF: return 4
if ch > 0xFF: width=2
return width
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue17629>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com