> > outside of the string passed to the message variable in the call to dict > my code is exactly the same, I didn't have any luck with the version above > this so I coded this instead. As far as the syntax error, I would be happy > to know where it is as I can't see it. And yes the trace is pointing to a > piece of code that doesn't show in my file. > non-keyword arg after keyword arg (default.py, line 14) > and line 14 is the last line of my code that I am showing here. > *return dict(message="hello", session.counter)* > Yes, that's the syntax error that several people have now pointed out to you. You have passed session.counter to dict() as a non-keyword argument (and it only takes keyword arguments, where the argument names become the dict keys). You have mis-copied that line from the book -- it should be:
return dict(message="Hello from MyApp", counter=session.counter) Anthony