Comment on Show HN: HN Deck – An alternative way to browse Hacker NewsComments−gitgud6yInteresting 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.−sagunshOP6yGot your point, fixed it. Let me know if it seems correct now.−gitgud6yPerfect!−Inversechi6yI did exactly this.−airstrike6yIn 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 wellI also miss seeing the clickable domain next to the submission's title rather than all the way down at the bottom−the_pwner2246y"Discuss" if comments == 0 else (f"{comments} comment" + "s"*(comments > 1))−airstrike6ySure, I can put it all in one line too: "%d comment%s" % (comments, "s" if comments > 1 else "") if comments > 0 else "Discuss"
Comments
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.
Got your point, fixed it. Let me know if it seems correct now.
Perfect!
I did exactly this.
In fact, to perfectly mimic the HN experience, it should be
It feels really ugly doing this in Python, but oh wellI also miss seeing the clickable domain next to the submission's title rather than all the way down at the bottom
"Discuss" if comments == 0 else (f"{comments} comment" + "s"*(comments > 1))
Sure, I can put it all in one line too: