On 03/16/2013 11:16 AM, Yves S. Garret wrote:
On Saturday, March 16, 2013 11:10:07 AM UTC-4, Mitya Sirenef wrote:
On 03/16/2013 10:53 AM, Yves S. Garret wrote:
Hi all, I'm well into "Python Programming for the Absolute Beginner" in order
to
> become more acquainted with the language. However, when I got to page
304 and
> did my first example:
>
> http://bin.cakephp.org/view/1107093008
>
> And this is the error that I'm getting:
>
> http://bin.cakephp.org/view/399711843
>
> This is the code that came with the book:
>
> http://bin.cakephp.org/view/514822432
>
>
> What I don't understand is, why am I getting that error? I've done
diff -w
> and the code looks for the most part the same. What am I doing wrong
when I
> put the application together?
The error is that indexes are supposed to be integers, instead you have
a text string:
"That's not the correct password, so I can't s hare the secret with you."
-m
--
Lark's Tongue Guide to Python: http://lightbird.net/larks/
The existence of any evil anywhere at any time absolutely ruins a total
optimism. George Santayana
*shrug*
In the example that I have posted from the book it works just fine. I also used
this batch file to help me along.
longevity.py
pause
Hence the question mark over my head at the moment :) .
You are giving a message to the delete call, but delete call
needs an integer to work. In the book, it's not a delete call
but an insert call that's why it works there.
-m
--
Lark's Tongue Guide to Python: http://lightbird.net/larks/
--
http://mail.python.org/mailman/listinfo/python-list