JuliaCollections / JuliaCollections/IterTools.jl
Differences in `Base.Iterators.partition` and `IterTools.partition`
Open
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 160
- Forks
- 30
- PR merge metrics
- No merged PRs in 30d
Description
There are some differences between Base.Iterators.partition and IterTools.partition. I brought it up on Slack and @oxinabox asked me to file an issue.
Base.Iterators.partitionreturns each chunk as anArray, whereasIterTools.partitionreturns aTuple- In the case that the last chunk is smaller than the requested partition size,
Base.Iterators.partitionreturns a shorter chunk, whereasIterTools.partitiondrops the last values. IterTools.partitionaccepts astepargument that determines the hop size for each chunk.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No source file or test is named. Start by locating the implementations and tests for Base.Iterators.partition and IterTools.partition, then compare their chunk types, handling of the final chunk, and step behavior. Done means the intended relationship between the two APIs is decided and the relevant behavior is covered by tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- backend-api-design
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 38/100