On Sat, Oct 22, 2016 at 10:09 PM, Paul Moore <p.f.mo...@gmail.com> wrote: > While I agree that it's important for new programmers to learn > precision, there are a lot of environments where smart quotes get > accidentally inserted into code. > > * Pasting code into MS Word documents for reference (even if you then > format the code as visibly code, the smart quote translation has > already happened). That's remarkably common in the sorts of > environments I deal in, where code gets quoted in documents, and then > later copied out to be reused.
One of my students remarked that she had a lot of trouble trying to maintain a notes file, because she couldn't decide whether to use a word processor (with a spell checker) or a code editor (with automatic indentation and syntax highlighting). Still, I think the solution would be to have code editors grow facilities for working with text, rather than word processors grow facilities for working with code, or programming languages grow features for coping with word processors. > * Tutorial/example material prepared by non-programmers, again using > tools that are too "helpful" in auto-converting to smart quotes. Definite learning moment for the person preparing the tutorial. If you were writing a tutorial for Russian speakers and just wrote everything using the Latin alphabet, nobody would say "we should teach Russian people to use the alphabet that my editor uses"; code has its own rules, and if you're writing about code, you should learn how to write it appropriately. > So in my experience this problem is pretty common. However, I view it > as a chance to teach correct use of quotes in programming, rather than > something to gloss over or "do what I mean" with. > > -1 from me. Agreed. Maybe the upshot of this will be a python-list thread recommending some editors that handle both code and screed well - that would be a worthwhile thread IMO. ChrisA _______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/