Iterator Design Pattern

Iterator Design Pattern

Channel:
Subscribers:
24,900
Published on ● Video Link: https://www.youtube.com/watch?v=5rRP1H4DZK4



Duration: 5:26
412 views
13


Iterator Design Pattern Article : https://medium.com/@sean_bradley/iterator-design-pattern-54655e97552c

Design Patterns In Python Book : https://www.amazon.com/dp/B08XLJ8Z2J

The Iterator Design Pattern describes an interface with next and has_next methods.
next returns the next object in the aggregate(collection, list)
has_next returns a value, usually a boolean indicating if the iterable is at the end of the list or not.
The benefits of using the Iterator pattern is that the client, can traverse an aggregate without needing to understand it's internal representation and data structures.

#python
#pythonDesignPatterns







Tags:
python
design patterns
iterator design pattern
B08XLJ8Z2J