This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
my_list = [ | |
1, 2, 3, | |
4, 5, 6, | |
] | |
result = some_function_that_takes_arguments( | |
'a', 'b', 'c', | |
'd', 'e', 'f', | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
my_list = [ | |
1, 2, 3, | |
4, 5, 6, | |
] | |
result = some_function_that_takes_arguments( | |
'a', 'b', 'c', | |
'd', 'e', 'f', | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 不額外做縮排 | |
if (this_is_one_thing and | |
that_is_another_thing): | |
do_something() | |
# 加入註解,可以在支援語法凸顯的編輯器中將兩者區分開來 | |
if (this_is_one_thing and | |
that_is_another_thing): | |
# Since both conditions are true, we can frobnicate. | |
do_something() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 沒有垂直對齊時,第一行不應該有參數 | |
foo = long_function_name(var_one, var_two, | |
var_three, var_four) | |
# 其他行要多縮一次縮排,不然沒辦法跟再下一層的內容分開 | |
def long_function_name( | |
var_one, var_two, var_three, | |
var_four): | |
print(var_one) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 對齊開頭分隔符號 | |
foo = long_function_name(var_one, var_two, | |
var_three, var_four) | |
# 要多縮排一次來區分 | |
def long_function_name( | |
var_one, var_two, var_three, | |
var_four): | |
print(var_one) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
os.getenv('DBCONN_STR') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MODE=development | |
DBHOST=localhost | |
DBPORT=5432 | |
DBCONN_STR=${DBHOST}:${DBPORT} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MODE=development | |
DBHOST=localhost | |
DBPORT=5432 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export DBHOST=localhost | |
export DBPORT=5432 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if [ -f ~/.bashrc ]; then | |
source ~/.bashrc | |
fi |