亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

諸如下面這種的,數據一長格式排版就不好看了,不知道如何排版是好?

諸如下面這種的,數據一長格式排版就不好看了,不知道如何排版是好?

江戶川亂折騰 2023-04-19 22:18:38
result = Animal.filter(name='dog', sex='female', age='2', color='yellow').limit(100).order(born)
查看完整描述

2 回答

?
慕哥6287543

TA貢獻1831條經驗 獲得超10個贊

Yes:

# Aligned with opening delimiterfoo = long_function_name(var_one, var_two,
                         var_three, var_four)# More indentation included to distinguish this from the rest.def long_function_name(
        var_one, var_two, var_three,
        var_four):    print(var_one)

No:

# Arguments on first line forbidden when not using vertical alignmentfoo = long_function_name(var_one, var_two,
    var_three, var_four)# Further indentation required as indentation is not distinguishabledef long_function_name(
    var_one, var_two, var_three,
    var_four):    print(var_one)

Optional:

# Extra indentation is not necessary.foo = long_function_name(
  var_one, var_two,
  var_three, var_four)


查看完整回答
反對 回復 2023-04-21
?
萬千封印

TA貢獻1891條經驗 獲得超3個贊

result = Animal.filter(        name='dog',        sex='female',        age='2',        color='yellow'
    ).limit(100).order(born)


查看完整回答
反對 回復 2023-04-21
  • 2 回答
  • 0 關注
  • 210 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號