Thomas Jollans wrote:
What if "set" has side effects? A compiler could only exclude this possibility if it knew exactly what "set" will be at run time,
And also that 'a' remains bound to the same object, and that object or anything reachable from it is not mutated in any way that could affect the result of set(a). That's quite a lot of information for an optimiser to deduce, particularly in a language as dynamic as Python. -- Greg -- http://mail.python.org/mailman/listinfo/python-list