3
我只想知道python的(python 2.7)解釋器是找到變量的類型。像Python動態類型行爲如何在內部工作。python解釋器如何在運行時確定變量的類型?
MacBook-Pro:~ neelabhsingh$ python
Python 2.7.12 (default, Jun 29 2016, 14:05:02)
>>> type(i)
<type 'int'>
>>> type(str1)
<type 'str'>
>>> testFloat = 45.67
>>> type(testFloat)
<type 'float'>
哪個特定的實現? CPython 2.7或3.4?或其他; PyPy,Jython,IronPython等? –
@PeterWood,Python 2.7.12 – Guest