> Disclaimer: Only do this if you hate yourself and the rest of the world.
I'm curious why the author would do this. Just for the fun in it?
I'm curious why the author would do this. Just for the fun in it?
I nearly spit my drink out at the name, though.
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.