Live data from Hacker News

Convert any Python file into a single line of code

github.com

1–10 of 27 posts

Re: Convert any Python file into a single line of code

#10

> Space: O(n). No code is ever duplicated, so the one-lined code produced is linear in the size of the input code. Seems like a non sequitur?

I'm not sure why you think that. Do you mean that normally, in this context "space" means the memory usage of a program, which isn't particularly related to the size of the program?

In which case, yeah, it's a little incongruous. The "space" bit is talking about the textual representation of the program produced, while the "time" bit is talking about the runtime characteristics of the program.

Post reply on HN