3 ms·
Interesting idea, but I think the comments count; "x comments" should probably be clickable as anyone from HN will instinctively click that, not the "discuss" t
by gitgud 6y ago
Interesting idea, but I think the comments count; "x comments" should probably be clickable as anyone from HN will instinctively click that, not the "discuss" text.
- Inversechi 6y agoI did exactly this.
- airstrike 6y agoIn fact, to perfectly mimic the HN experience, it should be plural = "s" if comments > 1 else "" "%d comment%s" % (comments, plural) if comments > 0 else "Discuss" It feels really ugly doing this in Python, but oh well I also miss seeing the clickable domain next to the submission's title rather than all the way down at the bottom
- the_pwner224 6y ago"Discuss" if comments == 0 else (f"{comments} comment" + "s"*(comments > 1))
- deleted 6y ago[deleted]
- airstrike 6y agoSure, I can put it all in one line too: "%d comment%s" % (comments, "s" if comments > 1 else "") if comments > 0 else "Discuss"
- sagunsh 6y agoGot your point, fixed it. Let me know if it seems correct now.
- gitgud 6y agoPerfect!