On Mon, May 11, 2020 at 2:29 PM Steve Barnes
So I thought that Steve made the opposite mistake, accidentally using regular ASCII quotes when he intended to use Unicode quotes. But it turns out that Steve's mail client sends emails with a HTML part and a plain text part, and the plain text part substitutes the ASCII quotes for smart quotes. Very clever!
My mail client prefers the plain text part when it is available, which is usually exactly what I would want. But in this case, it confused me for a bit.
-- Steven
[Steve Barnes] So we currently have a situation where not only does whether code works or not depends on who typed it, in what environment, with what settings but also on the same factors for who received it - so I could use Outlook or Word to send a code fragment to 100 people and 5 say that is great it works and the other 95 end up thinking that there is something wrong with their installation. Personally I don't think this fits in with the pythonic way of thinking!
I agree, it doesn't. So the solution is: Don't send code via something that mangles it. It might discard your indentation, mutate your quotes, convert it to HTML and then insert newlines when it converts back to text at the other end, or helpfully translate all the language keywords into French (okay, I haven't seen THAT happen, but I've seen all the others). Code is text but it is not English text, and anything that tries to parse it as English will be just as wrong as something that tries to parse it as Fortran. If you can't stop your tool from misparsing your code, get a better tool. It's not like they're expensive or hard to obtain. ChrisA