Message373553
Hi, using a file object is very common as it makes it possible to use something that is not a file, like an HTTP request or something already in memory. It makes the module serializing / de-serializing the data completely agnostic with regard to the actual physical storage which has some advantages, for example it will not raise FileNotFound.
If you want a oneliner to load data you already can use:
with open(filepath) as f: data = json.load(f) |
|
Date |
User |
Action |
Args |
2020-07-12 13:28:50 | remi.lapeyre | set | recipients:
+ remi.lapeyre, ys19991 |
2020-07-12 13:28:50 | remi.lapeyre | set | messageid: <1594560530.5.0.303995355049.issue41284@roundup.psfhosted.org> |
2020-07-12 13:28:50 | remi.lapeyre | link | issue41284 messages |
2020-07-12 13:28:50 | remi.lapeyre | create | |
|