View Single Post
Old 05-16-2007, 02:08 PM   #12
yargoflick is on a distinguished road
yargoflick's Avatar
Posts: 31
Karma: 60
Join Date: Mar 2007
Location: Newfoundland, Canada
Device: Sony Reader
Originally Posted by EatingPie
Thanks for the bug fix Lee. I'll add it and post it later tonight. Off to sushi right now.


I was thinking about this at work today, and I don't think my fix was very good...
You'ld probably want to check if the quote is at the beginning or end of the line and handle appropriately rather than ignoring it like I did.

if index == 0:
    #what to do if it starts the line
elif index == len(line)-1:
    #what to do if it ends the line
elif index > 0:
    #the code you already have for when it's 
    #floating around in the middle of the line
or something like that.
Just thought I'ld quickly mention that before I forgot about it, now I go back to work.

yargoflick is offline   Reply With Quote