Show More
@@ -157,11 +157,11 b' class EventfulList(list):' | |||||
157 | del_callback: [callback = None] |
|
157 | del_callback: [callback = None] | |
158 | reverse_callback: [callback = None] |
|
158 | reverse_callback: [callback = None] | |
159 | sort_callback: [callback = None]""" |
|
159 | sort_callback: [callback = None]""" | |
160 |
|
|
160 | self.on_insert(insert_callback) | |
161 |
|
|
161 | self.on_set(set_callback) | |
162 |
|
|
162 | self.on_del(del_callback) | |
163 |
|
|
163 | self.on_reverse(reverse_callback) | |
164 |
|
|
164 | self.on_sort(sort_callback) | |
165 |
|
165 | |||
166 | def on_insert(self, callback): |
|
166 | def on_insert(self, callback): | |
167 | """Register a callback for when an item is inserted into the list. |
|
167 | """Register a callback for when an item is inserted into the list. |
General Comments 0
You need to be logged in to leave comments.
Login now