I am reading Learn Python The Hard Way and I 开发者_Go百科am really curious what he means by
Read your .py file backwards
Exercise 41 (page 117) explains it better. This snippet:
cities['_find']=find_city
city_found=cities['_find'](cities,state)
reads like this when read backwards:
state
andcity
are...- passed as parameters to...
- a function at...
_find
inside...- the dict
cities
...- and finally assigned to
city_found
.
Reading something backwards word-for-word is also a great proofreading technique.
Often, when reading something forwards, you'll skip past words as you'll be assuming what comes next. Reading something backwards allows you to spot spelling errors more effectively.
精彩评论