COMPSCI 61A Lecture Notes - Lecture 30: Init, Declarative Programming, Iterator

41 views5 pages
zogo39484755 and 6 others unlocked
COMPSCI 61A Full Course Notes
22
COMPSCI 61A Full Course Notes
Verified Note
22 documents

Document Summary

Many data sets can be processed sequentially. Sensor readings of an airplane through time. However, sequence interface we used before does not always apply. Sequence allows elements selection for any element. Data is constantly changing so, data is gone. Now think about how to get computer to handle large amounts of input. Implicit representations of streams of sequential data. Not have entire data set available, but be able to access elements but doesn"t store it all. Declarative programming languages to manipulate and transform data. Used in python as way to access elems of different containers. Iter(iterable): return an iterator over the elems of an iterable value. Next(iterator): returns next element in an iterator. Iterators are always ordered, even if the container that produced them is not. Different iterators would give the same, for dict that hasn"t been modified. Eval header which must evaluate to an iterable object. A stopiteration exception is raised whenever next is called on empty iterator.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents