[Python-ideas] Smart/Curly Quote Marks and cPython

Paul Moore p.f.moore at gmail.com
Sat Oct 22 07:09:38 EDT 2016


On 22 October 2016 at 08:17, Chris Angelico <rosuav at gmail.com> wrote:
> On Sat, Oct 22, 2016 at 5:49 PM, Ryan Birmingham <rainventions at gmail.com> wrote:
>> this proposed change aims to solve the problem caused when editors, mail
>> clients, web browsers, and operating systems over-zealously replacing
>> straight quotes with these typographical characters.
>>
>
> A programming editor shouldn't mangle your quotes, and a word
> processor sucks for editing code anyway, so I'd rule those out. When
> does an operating system change your quotes? It's really just mail and
> web where these kinds of issues happen. Any web site that's actually
> designed for code is, like a programmer's editor, going to be
> quote-safe; and it's not hard to configure a mail client to not mess
> with you.
>
> How strong is this use-case, really?

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.
* Tutorial/example material prepared by non-programmers, again using
tools that are too "helpful" in auto-converting to smart quotes.

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.

Paul


More information about the Python-ideas mailing list