On 7 sep, 08:56, Mark Dickinson <[email protected]> wrote: > On Sep 7, 4:58 am, casevh <[email protected]> wrote: > > > IIRC, Python > > 3.2 changed (for floats) __str__ to call __repr__. > > Yes, exactly: str and repr of a float are identical in Python 3.2 + > > I'm also puzzled by the > > 2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32 bit (Intel)] > [...]>>> 1.1 * 1.1 > > 1.21 > > in jmf's message. Cut-and-paste typo? > > -- > Mark
No. But, it's *my* mistake. I'm using a modified sys.displayhook which uses a print statement (mainly for language reason). If forgot to reset to the initial/default state for these tests when working with too many opened interactive interpreters. Sorry for the noise. >>> sys.version '2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32 bit (Intel)]' >>> >>> 1.1 * 1.1 1.21 >>> 'éléphant' éléphant >>> >>> sys.displayhook = sys.__displayhook__ >>> 1.1 * 1.1 1.2100000000000002 >>> 'éléphant' '\xe9l\xe9phant' >>> sys.version '2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32 bit (Intel)]' >>> jmf -- http://mail.python.org/mailman/listinfo/python-list
