タグ

関連タグで絞り込む (0)

  • 関連タグはありません

タグの絞り込みを解除

Pythonとunicodeとprogrammingに関するsuzukiMYのブックマーク (2)

  • Pythonで unicodedata.normalize を使って全角半角を正規化する方法

    (この記事は 2008年03月14日に別のブログに投稿した記事を移動・編集したものです。) インターネット上の日語を扱っていると、全角半角が統一されていない事による表記揺れをなんとかしたい場面に出くわします。半角で書かれた iPod も、全角で書かれたiPodも同じものとして扱いたいときや、あるいは単に見た目がきれいになるように、英数字は半角に、カタカナは全角にそろえたい、という場合です。 Python では setomitsさんによる zenhan.py を使うと、文字種ごとに全角半角を選択して変換することができ、除外文字も設定できるので便利です。ただ、そこまで柔軟でなくても良く、単に表記揺れがなくなれば良い、という場合も多いかと思います。その場合はPythonの標準ライブラリに含まれる unicodedata モジュールの normalize 関数を使うと便利です。 >>> impo

  • BOO - Home

    _your description goes here_Yeah, it's that time again! As usual lots and lots of improvements in this new release including : (almost) complete nullable type support shorthandsfor nullable types (T?) and enumerables (T* instead of IEnumerable[of T]) improved booish behavior with nicer colors (and it should work inside emacs now ) 'else' block for 'for' and 'while loops fixes and improvement relat

    suzukiMY
    suzukiMY 2012/01/31
    Python ライクなCLI上で動作するスクリプト言語(静的型言語)
  • 1