質問編集履歴

1

PEP257に記載がありました

2017/05/10 02:45

投稿

Alice1017
Alice1017

スコア24

test CHANGED
File without changes
test CHANGED
@@ -180,8 +180,28 @@
180
180
 
181
181
 
182
182
 
183
- Pythonにはdocstringの書き方について書いてある [PEP257](https://www.python.org/dev/peps/pep-0257/) がありますが、その中で引数の書き方について言及されていませんでした。
183
+ Pythonにはdocstringの書き方について書いてある [PEP257](https://www.python.org/dev/peps/pep-0257/) がありますが、そこに
184
+
185
+
186
+
184
-
187
+ ```
188
+
185
-
189
+ def complex(real=0.0, imag=0.0):
190
+
186
-
191
+ """Form a complex number.
192
+
193
+
194
+
195
+ Keyword arguments:
196
+
197
+ real -- the real part (default 0.0)
198
+
199
+ imag -- the imaginary part (default 0.0)
200
+
201
+ """
202
+
203
+ ```
204
+
205
+
206
+
187
- Pythonistaのみなさんはどのように書くべきだと思われますでしょうか。
207
+ このように書け、と書いてありましたが、Pythonistaのみなさんはどのように書くべきだと思われますでしょうか。