Comment

Comment by jotaass

I don't think it's clever, it's quite unintuitive and ugly. To me anyway. If the author really wanted to cram everything into a list comprehension, the logical way to think about it is:

    (
        (int(tsc, 16), int(pc, 16))
        for tsc, _, pc, *_ in (line.strip().split(",") for line in fp)
    ),
Which is, of course, almost as ugly. Just use a for loop and yield
parent jotaass 2 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton