No problem, it happens to everyone. :-)

Anthony

On Tuesday, May 15, 2012 6:33:59 PM UTC-4, Gerald Klein wrote:
>
> OK, This is the post where I make a total fool out of myself, my contrite 
> apologies. I don't know if I had edited it to many times and was just not 
> seeing it. At the end of the day when I read the email and opened the code 
> there it was. I even recoded the previous part and it worked fine. Once 
> again I apologize and I do appreciate all your help. 
>
> thanks 
>
> --jerry
>
> On Tuesday, May 15, 2012 1:33:05 PM UTC-5, Anthony wrote:
>>
>> 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
>>
>

Reply via email to