Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on First THINK C Program (2020). Parent comment
I remember following a really old Python tutorial that suggested the way to write inline if/else statements was
C and A or B
A if C else B
There are no comments on this comment yet.
I remember following a really old Python tutorial that suggested the way to write inline if/else statements was
which makes use of similar short-circuiting behavior. Nowadays this is written as The and/or version depends on A being truthy, otherwise it evaluates both A and B, giving the value of B.