No ValueError for large exponents?

Robin Becker robin at NOSPAMreportlab.com
Thu Sep 7 01:19:15 CEST 2006


enigmadude wrote:
> As many have heard, IronPython 1.0 was released. When I was looking
> through the listed differences between CPython and IronPython, the
> document mentioned that using large exponents such as 10 **
> 735293857239475 will cause CPython to hang, whereas IronPython will
> raise a ValueError. Trying this on my own machine, it did indeed seem
> to cause CPython to hang. In cases such as this, should this be
> considered a bug in the CPython implementation that needs to be fixed?
> Or is there a reason for this, such as consideration of future changes
> and language definition vs language implementation, etc.?
> 
I suspect the hang may be python actually trying to work out the
1 followed by 735293857239475 zeroes. Perhaps IronPython has a forward 
looking algorithm that knows when to give up early.
-- 
Robin Becker



More information about the Python-list mailing list