Deleted articles cannot be recovered. Draft of this article would be also deleted. Are you sure you want to delete this article?
Pythonでコード書いてると、1回は残念だなぁと思うポイントとして表題の件があると思います。具体的には以下です。 # リストも辞書も出力がお世辞にも良いとは言えない。。 >>> print ['あ', 'い', 'う'] ['\xe3\x81\x82', '\xe3\x81\x84', '\xe3\x81\x86'] >>> print {'title':'ねじまき鳥', 'author':'村上春樹'} {'author': '\xe6\x9d\x91\xe4\xb8\x8a\xe6\x98\xa5\xe6\xa8\xb9', 'title': '\xe3\x81\xad\xe3\x81\x98\xe3\x81\xbe\xe3\x81\x8d\xe9\xb3\xa5'} 日本語がバイト表現な上、全要素が1行で表示されています。これではちょっとprintデバッグするにも萎えますよね。複雑
Dump all the attributes of an object (Python recipe) by Philip Kromer Print a nicely formatted overview of an object, including _everything_ in the object's `dir'. This is great when programming interactively. More comprehensive than help(), prettier than dir(). 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く