Re: [校園] 台大博士與他的巨匠夢
: 推 jonathan793: 昨天夢到要看用空白鍵縮排的python code 03/03 23:38
: → jonathan793: 嚇掉我的毛 03/03 23:38
安安泥豪,請問泥對用空白縮排的 Python Code 有什麼意見麻?
小魯妹最近剛學 Python 不太懂 > "" <
https://www.python.org/dev/peps/pep-0008/#tabs-or-spaces
這篇是來自 Python 社群給的 PEP (Python Enhancement Proposals)
作者三位分別是:
程式語言 Python 的老爹 Guido van Rossum
Nick Coghlan
直議器 JPython 維護者 Barry Warsaw
--
Tabs or Spaces?
Spaces are the preferred indentation method.
Tabs should be used solely to remain consistent with code that
is already indented with tabs.
Python 3 disallows mixing the use of tabs and spaces for
indentation.
Python 2 code indented with a mixture of tabs and spaces should
be converted to using spaces exclusively.
When invoking the Python 2 command line interpreter with the -t
option, it issues warnings about code that illegally mixes tabs
and spaces. When using -tt these warnings become errors. These
options are highly recommended!
--
所以到底用空格進行縮排是可以還4不可以喇?
泥搞得我好亂ㄛ
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 140.112.35.232
※ 文章網址: https://www.ptt.cc/bbs/NTU/M.1488630653.A.5A4.html
→
03/04 20:54, , 1F
03/04 20:54, 1F
推
03/04 20:55, , 2F
03/04 20:55, 2F
→
03/04 21:01, , 3F
03/04 21:01, 3F
→
03/04 21:02, , 4F
03/04 21:02, 4F
→
03/04 21:03, , 5F
03/04 21:03, 5F
→
03/04 21:03, , 6F
03/04 21:03, 6F
推
03/04 21:36, , 7F
03/04 21:36, 7F
推
03/04 23:36, , 8F
03/04 23:36, 8F
推
03/05 01:54, , 9F
03/05 01:54, 9F
→
03/05 01:54, , 10F
03/05 01:54, 10F
→
03/05 01:55, , 11F
03/05 01:55, 11F
安安,所以我就不知道他在酸什麼惹
我以為 Python 用空格縮排是多數人的習慣耶
※ 編輯: Marsden (140.112.35.232), 03/05/2017 02:36:04
推
03/05 04:06, , 12F
03/05 04:06, 12F
→
03/05 04:06, , 13F
03/05 04:06, 13F
推
03/05 04:58, , 14F
03/05 04:58, 14F
推
03/05 08:53, , 15F
03/05 08:53, 15F
→
03/05 08:53, , 16F
03/05 08:53, 16F
推
03/05 08:58, , 17F
03/05 08:58, 17F
推
03/05 11:55, , 18F
03/05 11:55, 18F
→
03/05 11:55, , 19F
03/05 11:55, 19F
推
03/05 12:48, , 20F
03/05 12:48, 20F
推
03/05 13:18, , 21F
03/05 13:18, 21F
推
03/05 13:59, , 22F
03/05 13:59, 22F
→
03/05 16:12, , 23F
03/05 16:12, 23F
→
03/05 17:38, , 24F
03/05 17:38, 24F
推
03/06 00:16, , 25F
03/06 00:16, 25F
→
03/06 00:20, , 26F
03/06 00:20, 26F
討論串 (同標題文章)