On Fri, Nov 25, 2016, at 06:33, Ned Batchelder wrote:
> A Python implementation can choose when to reuse immutable objects and
> when not to. Reusing a value has a cost, because the values have to
> be kept, and then found again. So the cost is only paid when there's
> a reasonable chance that the
On Fri, 25 Nov 2016 10:37 pm, Ned Batchelder wrote:
> And: floats are rarely checked for equality, and very very very rarely
> used as dict keys, so there's no gain by short-circuiting the equality
> check.
You cannot short-circuit the equality check, at least not without giving up
IEEE-754 seman
On Friday, November 25, 2016 at 7:17:08 AM UTC-5, BartC wrote:
> On 25/11/2016 11:24, Nikunj wrote:
> >
> > Out of curiosity, I wanted to understand the reason behind having different
> > memory location for two identical floats . This is unlike ints or strings.
> > Tried googling but couldn't fi
On 25/11/2016 11:24, Nikunj wrote:
Out of curiosity, I wanted to understand the reason behind having different
memory location for two identical floats . This is unlike ints or strings.
Tried googling but couldn't find anything concrete. Any links or references
would be appreciated!
Do you
On Friday, November 25, 2016 at 6:34:00 AM UTC-5, Ned Batchelder wrote:
> On Friday, November 25, 2016 at 6:24:47 AM UTC-5, Nikunj wrote:
> > Hi All,
> >
> > Out of curiosity, I wanted to understand the reason behind having different
> > memory location for two identical floats . This is unlike i
On Friday, November 25, 2016 at 6:24:47 AM UTC-5, Nikunj wrote:
> Hi All,
>
> Out of curiosity, I wanted to understand the reason behind having different
> memory location for two identical floats . This is unlike ints or strings.
> Tried googling but couldn't find anything concrete. Any links o
Hi All,
Out of curiosity, I wanted to understand the reason behind having different
memory location for two identical floats . This is unlike ints or strings.
Tried googling but couldn't find anything concrete. Any links or references
would be appreciated!
Example:
For FLOATS:
==
>>>