Skip to content

Add a strict option to itertools.batched() #113202

Description

@rhettinger

This is modeled on the strict option for zip().

One use case is improving the reshape() recipe. In numpy, a reshape will raise an exception if the new dimensions do not exactly fit the data.

Linked PRs

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-featureA feature request or enhancement

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions