gpt4 book ai didi

python - PEP 8 - 通过添加空格来对齐参数

转载 作者:行者123 更新时间:2023-12-05 08:47:29 25 4
gpt4 key购买 nike

<分区>

我倾向于通过以下(非常规)方式添加空格来对齐我的代码。

def my_demo_function(input1, input2, input3):
print(input1 + input2 + input3)

my_demo_function("some long string", "some other string", "some final string")
my_demo_function("other string", "another string", "another other string")
my_demo_function("blah1", "blah2 string", "blah3" )

PEP-8似乎没有讨论这种(hack?)对齐方式。有什么理由我不应该在我的代码中这样做吗?我可以设想这样一种情况,即阅读它的人不会向右滚动并错过一些重要的东西。

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com