Feb-21-2017, 06:24 AM
in a class method, i need to access an instance attribute, such as
self.foo
and use that value many times. is there any expected performance benefit to caching it in a local variable, such as doing foo = self.foo
, and using just foo
instead of self.foo
for all the uses? if i modify it i could do foo = whatever
or foo += somenumber
then finish with self.foo = foo
.
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.