bslatkin / effectivepython

Effective Python: Second Edition — Source Code and Errata for the Book
https://effectivepython.com
2.24k stars 718 forks source link

Item #10: Incorrect variable name referenced #59

Open bslatkin opened 4 years ago

bslatkin commented 4 years ago

Page 37, Item 10, line 2 from top

"I do this by fetching the count from the fruit_basket"

should be read as

"I do this by fetching the count from the fresh_fruit"


This is the code snippet that follows:

def make_cider(count):
     ...

count = fresh_fruit.get('apple', 0)
if count >= 4:
    make_cider(count)
else:
    out_of_stock()