@@ -101,7 +101,7 @@ You will notice that data incrementally flows through the different functions.
101101For this exercise the `stocksim.py` program should still be running in the background.
102102You’re going to use the `follow()` function you wrote in the previous exercise.
103103
104- # ## (a) Setting up a simple pipeline
104+ # ## Exercise 6.8: Setting up a simple pipeline
105105
106106Let' s see the pipelining idea in action. Write the following
107107function:
@@ -132,7 +132,7 @@ to it as an argument. Now, try this:
132132It might take awhile for output to appear, but eventually you
133133should see some lines containing data for IBM .
134134
135- # ## (b) Setting up a more complex pipeline
135+ # ## Exercise 6.9: Setting up a more complex pipeline
136136
137137Take the pipelining idea a few steps further by performing
138138more actions.
@@ -156,7 +156,7 @@ Well, that's interesting. What you're seeing here is that the output of the
156156`follow()` function has been piped into the `csv.reader()` function and we' re
157157now getting a sequence of split rows.
158158
159- # ## (c) Making more pipeline components
159+ # ## Exercise 6.10: Making more pipeline components
160160
161161Let' s extend the whole idea into a larger pipeline. In a separate file `ticker.py`,
162162start by creating a function that reads a CSV file as you did above:
@@ -237,7 +237,7 @@ Run your program again. You should now a stream of dictionaries like this:
237237...
238238```
239239
240- # ## (d) Filtering data
240+ # ## Exercise 6.11: Filtering data
241241
242242Write a function that filters data. For example:
243243
@@ -262,7 +262,7 @@ for row in rows:
262262 print (row)
263263```
264264
265- # ## (e) Putting it all together
265+ # ## Exercise 6.12: Putting it all together
266266
267267In the `ticker.py` program, write a function `ticker(portfile, logfile, fmt)`
268268that creates a real- time stock ticker from a given portfolio, logfile,
@@ -296,6 +296,6 @@ pipelines. In addition, you can create functions that package a
296296series of pipeline stages into a single function call (for example,
297297the `parse_stock_data()` function).
298298
299- [Next](04_More_generators )
299+ [Contents](.. / Contents) \ | [Previous (6.2 Customizing Iteration)](02_Customizing_iteration) \| [ Next (6.4 Generator Expressions) ](04_More_generators)
300300
301301
0 commit comments