question about the id()
Andrew Dalke
dalke at dalkescientific.com
Mon May 16 12:57:12 EDT 2005
Peter Dembinski wrote:
> So, the interpreter creates new 'point in address space' every time
> there is object-dot-method invocation in program?
Yes. That's why some code hand-optimizes inner loops by hoisting
the bound objection creation, as
data = []
data_append = data.append
for x in some_other_data:
.... work with x to make y ....
data_append(y)
Andrew
dalke at dalkescientific.com
More information about the Python-list
mailing list