###コーディングルール
pythonにおいて、みなさんのコーディングルールを教えて欲しいです。
具体的に2択or3択で提示しますので答えていただきたいです。
もしそれ以外のパターンであったり、どのような考え方が推奨されるのかをご教授いただけるのであれば回答お願いします。
Q1 A
Q2 A
Q3 B
のように答えていただけると幸いです。
###Question1 関数の空白行について①
- A
python
1def sample1(test): 2 if len(test) == 0: 3 print("No Data") 4 else: 5 print(test)
- B
python
1def sample1(test): 2 3 if len(test) == 0: 4 print("No Data") 5 else: 6 print(test)
###Question2 関数の空白行について②
- A
python
1def sample1(test): 2 return test*2
- B
python
1def sample1(test): 2 3 return test*2
###Question3 関数間の空白行について
- A
python
1def sample1(test): 2 # 3 # 処理 4 # 5#空白1行 6def sample2(test,temp): 7 # 8 # 処理 9 #
- B
python
1def sample1(test): 2 # 3 # 処理 4 # 5#空白2行 6# 7def sample2(test,temp): 8 # 9 # 処理 10 #
- C
python
1def sample1(test): 2 # 3 # 処理 4 # 5def sample2(test,temp):#空白なし 6 # 7 # 処理 8 #
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2017/06/13 11:09