Martin v. Löwis <mar...@v.loewis.de> added the comment:

> Returning the same object vs new object for bound methods is a
> non-guaranteed implementation detail (as long the other semantics remain
> true).   I think Martin's real concern is that trying to intern bound
> methods would be a can of worms (one that I wouldn't want to open).

I'm also concerned about the change in behavior. Whether or not it is
guaranteed - some code in the world *will* notice. IMO, optimizations
should only be implemented if there is no change in observable behavior,
or if the improvement is so large that breaking compatibility is
justified.

----------
title: LOAD_CONST followed by LOAD_ATTR can be optimized to just be a LOAD_COST 
-> LOAD_CONST followed by LOAD_ATTR can be optimized to just    be a LOAD_COST

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue6133>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to