Raymond Hettinger wrote:
> Yes, I get that. Just want to point-out that working with heavily
nested dictionaries (typical for JSON) is no fun with square brackets
and quotation marks.
I can certainly agree with that sentiment, especially when working with something like GraphQL that tends to return deeply nested JSON objects. Repeatedly using [''] can get quite tiresome (and not look particularly great) with something like this:
```
for pr_edge in pr_json['data']['user']['pullRequests']['edges']: |
for comment_edge in pr_edge['node']['comments']['edges']: |
commenter = comment_edge[
'node'][
'author'][
'login']
...
```
(Extracted from a personal side-project I worked on last year)
|
|