[Tutor] Evaluate my script?
Adam Gomaa
python-tutor at adamgomaa.com
Tue Oct 24 19:32:55 CEST 2006
Thanks for your help! I've rewritten it with many of your suggestions
and will definitely use this as a reference for future scripts.
Here's the updated one.
(I also played around with lambdas, I don't know if they're actually
needed/useful there, but I haven't used them before and I wanted some
practice with them).
I ran into some trouble with string.strip(). I worked around it by
simply piling on more strip statements, although I doubt that's the
correct way to do it :P. It's in the splitInput() function, inside the
parseInput() function.
> That's a lot of comments for such a small program, so keep in mind you don't
> have to do everything I (or others :)) write. Some of the advice is generic in
> nature: e.g. you might not care about reuse in this particular case, but it's
> still good to know what you should pay attention to in the cases where you DO
> care.
I was afraid I hadn't commented enough! Well, now I know...
Thanks again,
Adam
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pvnrt3.py
Type: text/x-python
Size: 5593 bytes
Desc: not available
Url : http://mail.python.org/pipermail/tutor/attachments/20061024/a2a9879d/attachment-0001.py
More information about the Tutor
mailing list