Iterators for Bioinformatics
Key Concepts
- Class-based iterator vs generator function: both do the same job, but generators are far less code. Use a class only when you need extra state (resettable position,
peek()method). - Single-pass exhaustion: once an iterator is exhausted,
list(it)returns[]. Re-create if needed. itertoolsreturns lazy iterators. Wrap inlist()to materialize, or consume in a for loop.
Class-Based Codon Iterator
Use when you need rese
[Description truncada. Veja o README completo no GitHub.]