Skip to content

Add __next__ method to FastaTwoLineIterator#5078

Open
vihaankulkarni29 wants to merge 1 commit intobiopython:masterfrom
vihaankulkarni29:fix-fasta-iterator-3988
Open

Add __next__ method to FastaTwoLineIterator#5078
vihaankulkarni29 wants to merge 1 commit intobiopython:masterfrom
vihaankulkarni29:fix-fasta-iterator-3988

Conversation

@vihaankulkarni29
Copy link

Hi there,

This PR adds the explicit __next__ method to the FastaTwoLineIterator class, addressing issue #3988. This makes the class a more complete and explicit iterator.

I have run the test suite locally. The isolated tests for the Bio.SeqIO module passed successfully after this change.

Thanks!

@peterjc peterjc requested a review from mdehoon October 15, 2025 09:14
"""
super().__init__(source, fmt="FASTA")
self._data = FastaTwoLineParser(self.stream)
self.records = self._generate_records()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like making a new public attribute here (other parsers won't do this).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes this should be a private attribute

@peterjc
Copy link
Member

peterjc commented Oct 15, 2025

Also I think you linked to the wrong issue.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants