Comment

Comment by karolmajta

Fun is the only thing that can justify this blasphemy :)

Why do this instead of:

   myvar = read_json_file_as_object('path/to/file')
??

Ok, you can argue that function would hit the hard drive many times when called from multiple modules (while imports would not), but this can be fixed with simple memoization.

parent karolmajta 10 years ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton