Re:I'm Switching to Python and Actually Liking It
by NewsaHackO on Wednesday July 16, 2025 @02:23PM
(#44585351)
I don’t think anyone is criticizing its utility, just that the syntax of 2-5(?) underscores in a row isn’t something that is DX friendly.
[ Parent
| on HN ]
Re:I'm Switching to Python and Actually Liking It
by hiAndrewQuinn on Wednesday July 16, 2025 @02:30PM
(#44585419)
The ugliness is intentional. Nobody wants to name their cool new variable __hot__singleton__in__your__area__.
Re:I'm Switching to Python and Actually Liking It
by dragonwriter on Wednesday July 16, 2025 @02:27PM
(#44585399)
The syntax is exactly two, not 2-5.
Re:I'm Switching to Python and Actually Liking It
by JKCalhoun on Wednesday July 16, 2025 @04:09PM
(#44586287)
I think the point was: who can know by looking at it.
Re:I'm Switching to Python and Actually Liking It
by gcbirzan on Wednesday July 16, 2025 @04:24PM
(#44586443)
I mean, maybe you should use a font that doesn't make it hard to figure that out. Next you're gonna say we should ban 0s and Os, Is and ls, because your font doesn't allow you to figure out which one it is.
Re:I'm Switching to Python and Actually Liking It
by dragonwriter on Wednesday July 16, 2025 @05:39PM
(#44587076)
Anyone using a monospacdd font, a font where underscores are separated, or a run-together proportional font that they are even a little bit familiar with, because of the relative width of underscores and other characters.
Which, between them, covers approximately everyone.
Re:I'm Switching to Python and Actually Liking It
by globular-toast on Thursday July 17, 2025 @02:55AM
(#44590496)
They are called dunder methods, meaning "double under". It's 2 underscores.
I've had snippets in my editor for approximately 15 years at this point so I don't have to manually type any of the dunder methods. Would recommend!