<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
    <title></title>
  </head>
  <body bgcolor="#ffffff" text="#000000">
    On 5/11/2011 11:24 AM, Robert . wrote:
    <blockquote
      cite="mid:BANLkTi=Pzk56yMabBHa6O1O8USDMhQrZZQ@mail.gmail.com"
      type="cite">Hi all,<br>
      <br>
      My first post ever! :)<br>
      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)<br>
      <br>
      The main confusion is coming from<b> 'cities['_find'] = find_city'</b>
      I'm not sure what this is really doing.<br>
      <br>
      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. <br>
    </blockquote>
    <br>
    This stores a reference to the function. The following line is the
    call to the function.<br>
    <br>
    city_found = cities['_find'](cities,state)<br>
    <br>
    [snip]<br>
    <pre class="moz-signature" cols="72">-- 
Bob Gailer
919-636-4239
Chapel Hill NC</pre>
  </body>
</html>