-
Notifications
You must be signed in to change notification settings - Fork 96
Idea: Use case for a VersionIterator? #223
Copy link
Copy link
Open
Labels
DesignIdeas, suggestions, musings about design questionsIdeas, suggestions, musings about design questionsDocDocumentation related issueDocumentation related issueEnhancementNot a bug, but increases or improves in value, quality, desirability, or attractivenessNot a bug, but increases or improves in value, quality, desirability, or attractivenessQuestionUnclear or open issue subject for debateUnclear or open issue subject for debateRelease_3.x.yOnly for the major release 3Only for the major release 3
Metadata
Metadata
Assignees
Labels
DesignIdeas, suggestions, musings about design questionsIdeas, suggestions, musings about design questionsDocDocumentation related issueDocumentation related issueEnhancementNot a bug, but increases or improves in value, quality, desirability, or attractivenessNot a bug, but increases or improves in value, quality, desirability, or attractivenessQuestionUnclear or open issue subject for debateUnclear or open issue subject for debateRelease_3.x.yOnly for the major release 3Only for the major release 3
Situation
For example, if we want to start from a certain version and get the next 3 versions we could do that:
This would work, but maybe we could use the iterator protocol for that.
Proposed Solution
The solution is very rough, but that's on purpose. It's a minimal example to demonstrate the idea and not get distracted by other methods. So I know, this would need fine-tuning (add properties, protect from invalid datatypes etc.).
An implementation could look like this:
Questions
__init__?Actually, I'm not sure myself if this is something good or completely unnecessary. I just had this idea when working on issue #222. 😉 Also I thought, it would be helpful to document it, regardless if this will be accepted or not.
@gsakkis, @scls19fr
What do you think? I would like to hear your opinion. 😉