On 6/26/06, Ka-Ping Yee <[EMAIL PROTECTED]> wrote:
> On Mon, 26 Jun 2006, Guido van Rossum wrote:
> > Most school I proponents (perhaps you're the only exception) have
> > claimed that optimization is desirable, but added that it would be
> > easy to add hash-based optimization. IMO it's not so easy in the light
> > of various failure modes of hash(). (A possible solution would be to
> > only use hashing if the expression's type is one of a small set of
> > trusted builtins, and not a subclass; we can trust int.__hash__,
> > str.__hash__ and a few others.)
>
> That's a good idea!  At first glance, it seems like that could lead to
> a plausible compromise.

I'm not so sure. I realized that school I really doesn't have a good
story for optimizing cases involving named constants.

Anyway, after this afternoon's discussion I rewrote the section of the
PEP that discusses the semantic schools of though, hopefully
representing and distinguishing the different schools more accurately.
Look for revision 47120 (it's in svn, but it seems to take a while to
propagate to python.org).

-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)
_______________________________________________
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

Reply via email to