-7
對於本頁的示例: https://wiki.python.org/moin/CrashingPython#Exhausting_Resources 爲什麼這個案例不能在我的python 2.7中複製 爲什麼它可以使python崩潰?爲什麼python不會在這種情況下崩潰?
$ python
Python 2.4.2 (#2, Sep 30 2005, 21:19:01)
[GCC 4.0.2 20050808 (prerelease) (Ubuntu 4.0.1-4ubuntu8)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> f = lambda: None
>>> for i in xrange(1000000):
... f = f.__call__
...
>>> del f
Segmentation fault
錯誤一直在被修復,包括這一項。爲什麼應該有一個具體的解釋,爲什麼這不能在Python 2.7中複製? –
我甚至無法用Python 2.4.6重現這一點,所以這給你一個很好的範圍去搜索[更改歷史記錄](https://hg.python.org/cpython/file/2.4/Misc/NEWS )。 –
在那裏,我們擁有它:http://bugs.python.org/issue532646,在Python 2.4.4中修復。 –