"Nick Craig-Wood" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Fri, Sep 29, 2006 at 12:03:03PM -0700, Guido van Rossum wrote: >> I see some confusion in this thread. >> >> If a *LITERAL* 0.0 (or any other float literal) is used, you only get >> one object, no matter how many times it is used. > > For some reason that doesn't happen in the interpreter which has been > confusing the issue slightly... > > $ python2.5 >>>> a=0.0 >>>> b=0.0 >>>> id(a), id(b) > (134737756, 134737772)
Guido said *a* literal (emphasis shifted), reused as in a loop or function recalled, while you used *a* literal, then *another* literal, without reuse. Try a=b=0.0 instead. Terry Jan Reedy _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com