Hacker News new | ask | show | jobs
by antod 1283 days ago
> That snippet looks like Python/Lua/C with the for, case and close being used

Not really Python like at all - apart from the one line with for. Python doesn't have a case or when statement, or syntax level regex, doesn't open or close directories, and for files it would idiomatically would use the context manager for file access rather than closing it.

But it also doesn't look like any Ruby I've seen or written either :)

1 comments

For the record, Python didn't have a case or when statement. It does now, recently added to version 3.10.
Doh, spending too long in Ruby lately - got some catching up to do.