def foo(x): """ :rtype: list of str """ return x def bar(x): a = foo(x) a[0]. # <- この時点で文字列のメソッドが候補になる docstring Sphinx の書き方と Epytext の書き方を受け付けるようですが、 Python では Sphinx の方が一般的なのでそれに習いましょう。 def repeat(x, y): """ :param str x: value to repeat :type y: int :param y: number of repeat :rtype: str :return: repeated string """ return x * y 引数は :param 型 名前: という書き方でもいいですし、 :type 引数名: 型 という書き方もできます。 戻り値は :rt
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く