3 ms·
As someone points out in the comments, it is unfortunate that quotes are the only delimiter which doesn’t differentiate between opening and closing, leading to
by Jakob 4y ago
As someone points out in the comments, it is unfortunate that quotes are the only delimiter which doesn’t differentiate between opening and closing, leading to all the parsing woes, unlike
(), <>, {}, [], …
I wonder why the default for ASCII string quotation was not
`string'
- mongol 4y ago` is a dead key in many keyboard layouts. On my keyboard, I need to press shift + key left of backspace, followed by space to get it. And if I type something else I get an annoying bell sound.
- toxik 4y agoLet’s compromise then and have ‘foo’, now nobody can write it!
- kzrdude 4y agoPython 2 used the backtick for repr. I had almost forgotten this. Python people also testified about all the book typesetting issues with this, and other reasons, and said backtick would never again have a use in Python.
- keybored 4y agoGood idea assuming that backtick is not used for anything else already. The only problem with backticks is that European keyboards hate them if you have dead keys enabled.
- henrydark 4y agothat's what it is in m4
- layer8 4y agoIn many (most?) fonts, "'" is straight while "`" is slanted, so that looks terrible. Also, traditionally the double quote (") is the standard quote delimiter, because it is visually more prominent than the single quote, but there is only one kind of it in ASCII. Typographic quotes (“like this”) would arguably be best, but for most people it wouldn't be obvious how to enter them; and also different natural languages have different conventions here. Once we go outside of ASCII, you also have «this» and「this」and《this》and so on.
- ejolto 4y agoIn scandinavian languages we differentiate between opening and closing quotes, too bad they are not supported by python « open and close ».