Why does 1**2**3**4**5 raise a MemoryError?
morphex
morphex at gmail.com
Sun Mar 31 02:56:46 EDT 2013
Hi.
I was just doodling around with the python interpreter today, and here is the dump from the terminal:
morphex at laptop:~$ python
Python 2.7.3 (default, Sep 26 2012, 21:53:58)
[GCC 4.7.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> 1**2
1
>>> 1**2**3
1
>>> 1**2**3**4
1L
>>> 1**2**3**4**5
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
MemoryError
>>>
Does anyone know why this raises a MemoryError? Doesn't make sense to me.
Happy Easter!
-Morten
More information about the Python-list
mailing list