內Python運行時環境,請嘗試以下操作:01208在python中有特殊含義還是python2.6.2的一個bug?
>> *type(01207)*
你會得到:
<type 'int'>
然後嘗試:
>> *type(01208)*
您將獲得:
File "<stdin>", line 1
type(01208)
^
內Python運行時環境,請嘗試以下操作:01208在python中有特殊含義還是python2.6.2的一個bug?
>> *type(01207)*
你會得到:
<type 'int'>
然後嘗試:
>> *type(01208)*
您將獲得:
File "<stdin>", line 1
type(01208)
^
「type(08)」或「08」無效。 – dawg
絕對是一個錯誤。但是,我擔心它在_your_代碼中。 –
+1,因爲它認爲它可能有特殊的含義(相同的含義適用於許多其他語言)。它是[在文檔中](http://docs.python.org/2/reference/lexical_analysis.html#integer-and-long-integer-literals) –