it might come down to the CPU cost of
.attribute
vs a plain local variable. given that self
is a local variable there is already the cost of accessing self
. now add on the cost of accessing an attribute within it ... unless python does any performance optimizing for self
specifically (because it is so commonly used) or for repeating expressions.
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.