Learning Python the Hard Way, Exercise 41 headache
<p>I'm trying to learn Python with the help of Learning Python the Hard Way.
I've reached exercise 41 (Gothons from Planet Percal #25), you can see the full code <a href="http://learnpythonthehardway.org/book/ex41.html" rel="nofollow">>here&lt;</a></p>

<p>I understand everything until the last function runner()</p>

<pre><code>def runner(map, start)
    next = start

    while True:
        room = map[next]
        print "\n--------"
        next = room()

runner(ROOMS, 'central_corridor')
</code></pre>

<p>As far as I can understand, <strong>next</strong> is assigned the value of start, being the key of the first function to run. The the while loop is initiated assigning the function at that key to <strong>room</strong>.
Then the function prints out a line of dashes and after that it assigns the returned value of the function call to the variable <strong>next</strong>.</p>

<p>What I don't understand is why the user "sees" the function being called. To me it looks like the function call is just assigned to a variable <strong>next</strong>. I would expect something like <strong>next()</strong> or <strong>room()</strong> being the next line. Secondly I don't understand why the while-loop stops, shouldn't it just continue until false or quit?</p>

<p>These might seem like foolish questions to most of you, but I'm new to the programming game and I don't understand the answers being given to this question elsewhere on this site.</p>

<p>Hope someone can dumb down to my level and explain it to me...</p>
