Python には docstring (ドキュメンテーション文字列)というソースコードにドキュメントを書く仕組みがあります。 このドキュメントを Python 対話シェルで参照した場合、次のようになります。 PEP 257 -- Docstring Conventions www.python.jp/doc/contrib/peps/pep-0257.txt
古い記事なんですが, Pythonのデコレータの概念をつかむには良記事だったので和訳意訳してみました. http://simeonfranklin.com/blog/2012/jul/1/python-decorators-in-12-steps/ Step1. 関数 これは基本ですね. Pythonにおいて関数はdefキーワードにより関数名とパラメータのリスト(任意)とともに定義できます.また括弧付きで名前を指定することで実行できます. Step2. スコープ Pythonでは関数を作ると新しいスコープが作られます.言い方を変えるとそれぞれの関数がそれぞれに名前空間を持つということです. Pythonではこれらを確認することのできる組み込み関数も用意されていて, locals()で自身の持つローカルな名前空間の値を辞書形式で返却します.
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く