-
Notifications
You must be signed in to change notification settings - Fork 163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Counter Batches and Reverse table scans #96
base: master
Are you sure you want to change the base?
Conversation
|
|
|
|
||
def counter_inc(self, row, column, value=1): | ||
self.batch[(row, column)] += value | ||
self.batch_count += 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think this is incorrect. if the (row, column)
tuple was already present this count will be wrong. i guess len(self.batch)
is a better count ;)
I've solved the merge conflicts and the patch_counter problem, out of the need to use this in pyhton3. Third PR about this feature. Time to merge! :) |
Or alternatively, one can use a context manager:
which will return the data in reversed order