On Mon, 15 Mar 2010 22:56:19 +0000, Grant Edwards wrote: > On 2010-03-15, Steven D'Aprano <st...@remove-this-cybersource.com.au> > wrote: >> On Mon, 15 Mar 2010 18:09:29 +0000, Grant Edwards wrote: >> >>>> Delete the character between "y_diff" and "H" and replace it with a >>>> plain ASCII subtraction sign. >>> >>> I think somebody needs to stop editing his code with MS Word and start >>> using a programming editor. ;) >> >> I've had this error myself, and I've never used Word to edit code. It >> can happen if you copy code from a website that "helpfully" converts >> hyphens to en-dashes, spaces to non-breaking spaces, or inserts ctrl-Z >> characters into strings, etc. They're a devil to debug. > > Though it may not be Microsoft Word, I think I'd still maintain that an > editor where you can't see a ctrl-Z or tell the difference between an > ASCII minus and a windows-codepage-whatever isn't a very good > programmer's editor.
Regarding ctrl-Z (or for that matter other control characters), I agree it's a lack. As for not being able to see the difference between a hyphen and an EN- dash, or minus sign, or whatever it is, yes but they are very similar looking glyphs in virtually ever modern font. It would take a good eye to see the difference between (say) ‐ ‑ and -. -- Steven -- http://mail.python.org/mailman/listinfo/python-list