Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose FastaRecord __iter__ method for hybrid line/object-based iteration #30

Closed
mdshw5 opened this issue Nov 18, 2014 · 0 comments
Closed

Comments

@mdshw5
Copy link
Owner

mdshw5 commented Nov 18, 2014

Sometimes it would be useful to do something like:

for line in FastaRecord:
  do something with the line

Currently FastaRecord's __getitem__ returns the entire contents of a FASTA entry as a string. Maybe a __iter__ method could return smaller chunks to limit memory consumption. Might be able to use the read-ahead buffer from #26.

@mdshw5 mdshw5 changed the title Expose FastaRecord __next__ method for hybrid line/object-based iteration Expose FastaRecord __iter__ method for hybrid line/object-based iteration Nov 20, 2014
@mdshw5 mdshw5 closed this as completed Nov 20, 2014
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

No branches or pull requests

1 participant