3 ms·
(am not the GP) I personally like double quotes, because in so many other languages they are for strings, while single quotes are often for other things. But s
by zelphirkalt 3mo ago
(am not the GP)
I personally like double quotes, because in so many other languages they are for strings, while single quotes are often for other things. But somehow many people have a single quotes obsession in Python. I am guessing, that it is because of ease of typing them on a US keyboard layout.
- maratc 3mo ago> many people have a single quotes obsession Not my problem. My problem is that I want to use them both, as I've been able to for many years. I'll always use double to surround "can't" and single to surround '8.5" x 14"'. I'll use a context-appropriate pair when adding to existing code. But for all the other cases, I don't want to expend any energy on this. It's a complete non-issue. > ease of typing them on a US keyboard layout On both the US and European keyboards single-quotes are easier: no need to press Shift.
- MayeulC 3mo agoRegional keyboards are a mess for coding. I'm much happier with a qmk-enabled keyboard where I remap keys in hardware. For instance, on a French keyboard: - easy: " ' , : * ! - _ = ( ) - harder (shift): numbers . µ ? / ℅ + - hardest (Alt Gr): []{}€~|`^\@# This is not exhaustive, but some of the most common symbols are quite hard to type: not surprising as most language designers use US keyboards. Still, I think everyone would benefit from a "symbols" layer on their keyboards.
- zelphirkalt 3mo agoAt least on German keyboard layout double quotes are not a single key press, but a shift + something combination. Shift + 2, I believe. It's been a while since I used German layout. But I am aware, that other EU countries have other layouts, so there it could be a single key press, and I wouldn't know.