On 5/11/2011 11:24 AM, Robert . wrote:
Hi all,
My first post ever! :)
I'm following the guide "Learn Python the Hard Way" and have reached a
point where I am struggling to understand the code and unfortunately
the authors guide hasn't cleared it up for me. (excercise 40 for
reference)
The main confusion is coming from*'cities['_find'] = find_city'* I'm
not sure what this is really doing.
From my learning, this should add an extra item to the dict with the
index name of "_find" and the value which is returned from "find_city"
function.
This stores a reference to the function. The following line is the call
to the function.
city_found = cities['_find'](cities,state)
[snip]
--
Bob Gailer
919-636-4239
Chapel Hill NC
_______________________________________________
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor