Object Orientated Programming: Week 8

Banner

Design Patterns 2

LEARNING OBJECTIVES


This week we are going to look at:

1. Introducing the ITERATOR PATTERN.
2. Introducing COMPREHENSIONS
.
3. Introducing GENERATORS.


Python 

Powerpoint: Iterator Pattern

Two page summary

Powerpoint: Iterator Pattern (Comprehensions)


Powerpoint: Iterator Pattern (Generators)

Two page summary


Python Code for Lab #1=5




Videos:
Iterator Pattern


Iterator Pattern (Comprehensions)


Iterator Pattern (Generators)





Sample Code:
Iterator Pattern * Easier Iterator Code * List Comprehensions * Set Comprehensions * Dictionary Comprehensions

Python IntrepreterCode in Action



Iterables and Iterators: Going Loopy With Python (
Steve Holden)


Python Tutorial: Iterators





Links


Lab #8
Lab #7 is all about checking if what you have learned in the episodes above all makes sense.



Back

If you have any suggestions, corrections, or comments, please feel free to e-mail me at:
Damian.X.Gordon(a)tudublin.ie