Pythonのお勉強 Part22
at TECH
867:methane
08/01/14 19:27:05
>>866
それはdocutilsの中でeast_asian_width()の結果をどう扱ってるかって話。
日本限定で使う分にはこんな感じで良いと思う。
def char_width(s):
if type(s) == 'str': s = unicode(s)
return 2 if east_asian_width(s) in 'WFA' else 1
次ページ続きを表示1を表示最新レス表示スレッドの検索類似スレ一覧話題のニュースおまかせリスト▼オプションを表示暇つぶし2ch
5397日前に更新/217 KB
担当:undef