2 + 2 = 5

Steven D'Aprano steve+comp.lang.python at pearwood.info
Thu Jul 5 07:32:48 CEST 2012


On Wed, 04 Jul 2012 23:38:17 -0400, Terry Reedy wrote:

> If I run the script in 3.3 Idle, I get the same output you got. If I
> then enter '5-2' interactively, I still get 3. Maybe the constant folder
> is always on now.

Yes, I believe constant folding is always on, since Python 2.4 if I 
remember correctly. Somebody who cares more than me can possibly check 
the "What's New" documents :)


-- 
Steven



More information about the Python-list mailing list