@@ -92,16 +92,16 @@ def __init__(self, register_address, struct_format, count):
92
92
self .format = struct_format
93
93
self .address = register_address
94
94
self .count = count
95
- self .id = "_structarray" + str (register_address )
95
+ self .array_id = "_structarray" + str (register_address )
96
96
97
97
def __get__ (self , obj , objtype = None ):
98
98
# We actually can't handle the indexing ourself due to data descriptor limits. So, we return
99
99
# an object that can instead. This object is bound to the object passed in here by its
100
100
# initializer and then cached on the object itself. That way its lifetime is tied to the
101
101
# lifetime of the object itself.
102
- if not hasattr (obj , self .id ):
103
- setattr (obj , self .id , _BoundStructArray (obj , self .address , self .format , self .count ))
104
- return getattr (obj , self .id )
102
+ if not hasattr (obj , self .array_id ):
103
+ setattr (obj , self .array_id , _BoundStructArray (obj , self .address , self .format , self .count ))
104
+ return getattr (obj , self .array_id )
105
105
106
106
def __set__ (self , obj , value ):
107
107
raise RuntimeError ()
0 commit comments