Feb-22-2017, 02:08 AM
(This post was last modified: Feb-22-2017, 02:08 AM by ichabod801.)
(Feb-21-2017, 10:51 AM)wavic Wrote: It doesn't matter. Both references are pointers to one memory address
It matters in terms of performance.
self.foo
has to do an attribute lookup to get that pointer, foo
just gives the pointer.Now, that performance gain is very slight and may not matter in some applications. But if you're doing it a million times, it will start to matter.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures