fixed minor typos
This commit is contained in:
@@ -262,7 +262,7 @@ dictionaries. Then compute the total cost:
|
|||||||
>>> sum([s.cost() for s in portfolio])
|
>>> sum([s.cost() for s in portfolio])
|
||||||
44671.15
|
44671.15
|
||||||
>>>
|
>>>
|
||||||
----
|
```
|
||||||
|
|
||||||
### Exercise 4.4: Using your class
|
### Exercise 4.4: Using your class
|
||||||
|
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ Consumer is a for-loop. It gets items and does something with them.
|
|||||||
*producer* → **processing** → **processing** → *consumer*
|
*producer* → **processing** → **processing** → *consumer*
|
||||||
|
|
||||||
```python
|
```python
|
||||||
def processing(s:
|
def processing(s):
|
||||||
for item in s:
|
for item in s:
|
||||||
...
|
...
|
||||||
yield newitem
|
yield newitem
|
||||||
@@ -78,7 +78,7 @@ def producer():
|
|||||||
yield item # yields the item that is received by the `processing`
|
yield item # yields the item that is received by the `processing`
|
||||||
...
|
...
|
||||||
|
|
||||||
def processing(s:
|
def processing(s):
|
||||||
for item in s: # Comes from the `producer`
|
for item in s: # Comes from the `producer`
|
||||||
...
|
...
|
||||||
yield newitem # yields a new item
|
yield newitem # yields a new item
|
||||||
|
|||||||
Reference in New Issue
Block a user