花了一些时间看了一下这本书,感觉python真是个极好入门的语言。本书的讲解很到位,不过就是在对一些简单知识点的讲解方面投入了过多的笔墨,太啰嗦了。
书中练习的源代码下载地址:
https://ehmatthes.github.io/pcc/
这是英文版的勘误表【网站:https://www.nostarch.com/pythoncrashcourse】:
Page 100: The line that reads:
alien_0['speed'] = fast
Should instead read:
alien_0['speed'] = 'fast'
Page 175: The line that reads:
def ElectricCar(Car):
Should instead read:
class ElectricCar(Car):
And the line that reads:
def fill_gas_tank():
Should instead read:
def fill_gas_tank(self):
Page 180: In car.py, the line that reads:
def __init__(self, battery_size=60):
Should instead read:
def __init__(self, battery_size=70):
Page 207: In "Try It Yourself" 10-6, TypeError should be ValueError.
Page 223: In the listing survey.py, in the definition marked with a (2), the line that reads:
print(question)
Should instead read:
print(self.question)
And in the definition marked with a (4), the line that reads:
for response in responses:
Should instead read:
for response in self.responses:
Page 227: The paragraph that begins "The method setUp()..." that ends with:
...and test_store_single_response() verifies that all three responses in self.responses can be stored correctly.
Should instead end with:
...and test_store_three_responses() verifies that all three responses in self.responses can be stored correctly.
Page 288: In game_stats.py, the line that reads:
def __init__(self, settings):
Should instead read:
def __init__(self, ai_settings):
Pages 429 and 453: The line that reads:
form = TopicForm(request.POST)
Should instead read:
form = TopicForm(data=request.POST)
You'll find more updates at the author's website here