Skip to content

Document that itertools classes are picklable #103614

@Gouvernathor

Description

@Gouvernathor

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.)

Metadata

Metadata

Assignees

Labels

docsDocumentation in the Doc dirtype-featureA feature request or enhancement

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions