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
Correct __sizeof__ support for itertools #59680
Comments
Here is a patch that implements correct __sizeof__ for some itertools iterators: product(), combinations(), combinations_with_replacement() and permutations(). |
Patches updated on Meador's remarks. Tests updated to use new test.support helpers. |
Sorry, on Martin's remarks. |
The clean-up patch looks much nicer. Thanks. I'm not sure why anyone would really want this functionality for itertools, but I don't see any harm in adding it as long as the other implementations aren't required to follow. Also, it could be viewed as being a new feature, so I'm not sure backports are warranted. Be sure to ask the respective release managers before applying. |
On Wed, Aug 8, 2012 at 5:41 AM, Raymond Hettinger <report@bugs.python.org> wrote:
The general expection is that __sizeof__ is for CPython. We tag the tests
So far, we have been applying the __sizeof__ patches to all branches.
I will check with Georg for 3.3. Thanks. |
Are there any objections? |
Certainly not for 3.3.0. I'm also not sure this counts as a bugfix in any case. |
Georg, sorry, I don't understood you. You have no objection to the inclusion |
Ah, sorry, that was unclear. I meant "this is certainly not going into 3.3.0." |
Unassigning from myself. I thought I would have more time to review and push this through. |
Serhiy, you can make the decision on whether this goes into 3.4 or gets closed. I don't think any actual user has ever expressed interest in this functionality and it is hard to meaningfully reason about the real memory cost because we don't have a way to include the memory of the referred-to objects. To me, it seems like unnecessary code bloat. |
New changeset 9bce03920afe by Serhiy Storchaka in branch 'default': |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: