Well, that was just a though. You're right that long runs of constants
can appear, and it's better to avoid pathological behaviour in such
cases.
Your second path looks good.
Eugene
On Thu, Mar 10, 2011 at 6:30 PM, Antoine Pitrou wrote:
> On Thu, 10 Mar 2011 02:17:34 + (UTC)
> Eugene Toder
On Thu, 10 Mar 2011 02:17:34 + (UTC)
Eugene Toder wrote:
> > Indeed, see http://bugs.python.org/issue11244
>
> Yes, I've noticed that too. However, if I'm not missing something, your
> patches
> do not address folding of -0.
>
> Btw, there's an alternative approach to allow "recursive" cons
I've posted a patch.
Eugene
On Thu, Mar 10, 2011 at 3:30 PM, Mark Dickinson wrote:
> On Thu, Mar 10, 2011 at 2:17 AM, Eugene Toder wrote:
>>> Indeed, see http://bugs.python.org/issue11244
>>
>> Yes, I've noticed that too. However, if I'm not missing something, your
>> patches
>> do not address
On Thu, Mar 10, 2011 at 2:17 AM, Eugene Toder wrote:
>> Indeed, see http://bugs.python.org/issue11244
>
> Yes, I've noticed that too. However, if I'm not missing something, your
> patches
> do not address folding of -0.
Hmm, it seems that way. Could you post a comment on the tracker issue
about
> Indeed, see http://bugs.python.org/issue11244
Yes, I've noticed that too. However, if I'm not missing something, your patches
do not address folding of -0.
Btw, there's an alternative approach to allow "recursive" constant folding.
Instead of keeping a stack of last constants, you can keep a po
Hello,
> I've noticed since version 3.2 python doesn't fold -0:
Indeed, see http://bugs.python.org/issue11244
Regards
Antoine.
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http:/
Hello,
I've noticed since version 3.2 python doesn't fold -0:
Python 3.1.3 (r313:86834, Nov 28 2010, 10:01:07)
>>> def foo(): return -0
>>> dis(foo)
1 0 LOAD_CONST 1 (0)
3 RETURN_VALUE
Python 3.2 (r32:88445, Feb 20 2011, 21:30:00)
>>> def foo(): return -0