docs/reference/speed_python: Add missing self to var caching example.
This commit is contained in:
parent
0bec07f32b
commit
afc8596c15
@ -165,7 +165,7 @@ by caching the object in a local variable:
|
|||||||
|
|
||||||
class foo(object):
|
class foo(object):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
ba = bytearray(100)
|
self.ba = bytearray(100)
|
||||||
def bar(self, obj_display):
|
def bar(self, obj_display):
|
||||||
ba_ref = self.ba
|
ba_ref = self.ba
|
||||||
fb = obj_display.framebuffer
|
fb = obj_display.framebuffer
|
||||||
|
Loading…
Reference in New Issue
Block a user