-
Type: Improvement
-
Resolution: Done
-
Priority: Minor - P4
-
Affects Version/s: None
-
Component/s: None
-
None
-
Fully Compatible
Both Collection.insert and Collection.update provide a named parameter to disable manipulators: "manipulate=False".
This option should also be available for the "find" method.
Going into implementation details: when "manipulate" is set to False the code for Cursor.next can be simplified to:
def next(self):
if not self.__empty:
if len(self.__data) or self._refresh():
return self.__data.pop(0)
raise StopIteration
Cursor._init_ could switch between both implementations of "next" according to the value of "manipulate".