You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Document as a feature that the callables provided in the itertools module work with the pickle module.
Pitch
Pickling is very useful in general. By trying, I found that itertools.cycle objects were picklable.
Most iterators do not support pickling, this is notably the case with the basic generators shown as examples in the itertools doc page.
So, documenting that as a feature would be good so that apps can rely on it and not fear breakage when upgrading versions of python.
Of course, if maintainers are frosty about guaranteeing that for specific callables, documenting it for some and not others is good enough too.
(I didn't file this as a documentation issue because it's not a problem with the documentation.)
The text was updated successfully, but these errors were encountered:
A doc issue is an issue whose patch would only affect the docs in the repository /Docs directory. Changes can be either fixes or new features.
As I remember, the implementation of the itertools functions as C classes is a CPython implementation detail for speed. Another implementation could implement the module in Python using the generator functions in the docs. This is why the functions have lower-case function names rather than upper-case class names.
We changed the description of the generator functions from 'equivalent' to 'roughly equivalent' because some people took 'equivalent' to mean exactly equivalent in all visible behaviors.
Besides all this, Raymond now wants to get rid of itertools pickling.
@terryjreedy in that case, the Documentation entry would gain from being rephrased as "Report a problem or request a change in the documentation". The current formulation, "Report a problem with the documentation", is what made me choose the "feature" category instead.
Feature or enhancement
Document as a feature that the callables provided in the itertools module work with the pickle module.
Pitch
Pickling is very useful in general. By trying, I found that itertools.cycle objects were picklable.
Most iterators do not support pickling, this is notably the case with the basic generators shown as examples in the itertools doc page.
So, documenting that as a feature would be good so that apps can rely on it and not fear breakage when upgrading versions of python.
Of course, if maintainers are frosty about guaranteeing that for specific callables, documenting it for some and not others is good enough too.
(I didn't file this as a documentation issue because it's not a problem with the documentation.)
The text was updated successfully, but these errors were encountered: