Re: Possible bug in string handling (with kludgy work-around)

2011-12-28 Thread Lie Ryan
On 12/28/2011 11:57 AM, Rick Johnson wrote: On Dec 27, 3:38 pm, Terry Reedytjre...@udel.edu wrote: On 12/27/2011 1:04 PM, Rick Johnson wrote: But this brings up a very important topic. Why do we even need triple quote string literals to span multiple lines? Good question, and one i have

Re: Possible bug in string handling (with kludgy work-around)

2011-12-27 Thread Charles Hixson
That was it! Thanks. On 12/26/2011 02:44 PM, Chris Angelico wrote: On Tue, Dec 27, 2011 at 9:23 AM, Charles Hixson charleshi...@earthlink.net wrote: This doesn't cause a crash, but rather incorrect results. You may need to be a bit clearer. What line of code (or what expression)?

Re: Possible bug in string handling (with kludgy work-around)

2011-12-27 Thread Rick Johnson
-- Note: superfluous indention removed for clarity! -- On Dec 27, 8:53 am, Dennis Lee Bieber wlfr...@ix.netcom.com wrote: You can get by without the backslash in this situation too, by using triple quoting: I would not do that because: 1. Because Python already has TWO string literal

Re: Possible bug in string handling (with kludgy work-around)

2011-12-27 Thread Lie Ryan
On 12/28/2011 05:04 AM, Rick Johnson wrote: -- Note: superfluous indention removed for clarity! -- On Dec 27, 8:53 am, Dennis Lee Bieberwlfr...@ix.netcom.com wrote: You can get by without the backslash in this situation too, by using triple quoting: I would not do that because: 1. Because

Re: Possible bug in string handling (with kludgy work-around)

2011-12-27 Thread Terry Reedy
On 12/27/2011 1:04 PM, Rick Johnson wrote: But this brings up a very important topic. Why do we even need triple quote string literals to span multiple lines? Good question, and one i have never really mused on until now. I have, and the reason I thought of is that people, including me, too

Re: Possible bug in string handling (with kludgy work-around)

2011-12-27 Thread Rick Johnson
On Dec 27, 3:38 pm, Terry Reedy tjre...@udel.edu wrote: On 12/27/2011 1:04 PM, Rick Johnson wrote: But this brings up a very important topic. Why do we even need triple quote string literals to span multiple lines? Good question, and one i have never really mused on until now. I have,

Possible bug in string handling (with kludgy work-around)

2011-12-26 Thread Charles Hixson
This doesn't cause a crash, but rather incorrect results. self.wordList=[The, quick, brown, fox, carefully, jumps, over, the, lazy, dog, as, it, stealthily, wends, its, way, homewards, '\b.'] foriinrange (len (self.wordList) ): ifnot

Re: Possible bug in string handling (with kludgy work-around)

2011-12-26 Thread Chris Angelico
On Tue, Dec 27, 2011 at 9:23 AM, Charles Hixson charleshi...@earthlink.net wrote: This doesn't cause a crash, but rather incorrect results. You may need to be a bit clearer. What line of code (or what expression)? What did you expect to see, and what did you see? From examining your code, I've

Re: Possible bug in string handling (with kludgy work-around)

2011-12-26 Thread Rick Johnson
On Dec 26, 4:23 pm, Charles Hixson charleshi...@earthlink.net wrote: This doesn't cause a crash, but rather incorrect results. self.wordList    =    [The, quick, brown, fox, carefully,                  jumps, over, the, lazy, dog, as, it,                  stealthily, wends, its, way,

Re: Possible bug in string handling (with kludgy work-around)

2011-12-26 Thread Chris Angelico
On Tue, Dec 27, 2011 at 9:48 AM, Rick Johnson rantingrickjohn...@gmail.com wrote: Handy rules for reporting bugs: 1. Always format code properly. 2. Always trim excess fat from code. 3. Always include relative dependencies (self.wordlist is only valid inside a class. In this case, change the

Re: Possible bug in string handling (with kludgy work-around)

2011-12-26 Thread Steven D'Aprano
On Mon, 26 Dec 2011 14:23:03 -0800, Charles Hixson wrote: This doesn't cause a crash, but rather incorrect results. Charles, your code is badly formatted and virtually unreadable. You have four spaces between some tokens, lines are too long to fit in an email or News post without