Message394879
If the json.encoder code does get updated, it doesn't need two levels of matching. It can be flattened by eliminating the *chunks* variable.
match value:
case str():
yield _encoder(value)
case None:
yield 'null'
case True:
yield 'true'
case False:
yield 'false'
case int():
yield _intstr(value)
case float():
yield _floatstr(value)
case list() | tuple():
yield from _iterencode_list(value, _current_indent_level)
case dict():
yield from _iterencode_dict(value, _current_indent_level)
case _:
yield from _iterencode(value, _current_indent_level) |
|
Date |
User |
Action |
Args |
2021-06-02 00:06:36 | rhettinger | set | recipients:
+ rhettinger, steven.daprano, xtreak, brandtbucher, Kshitiz17 |
2021-06-02 00:06:36 | rhettinger | set | messageid: <1622592396.87.0.734666943999.issue44276@roundup.psfhosted.org> |
2021-06-02 00:06:36 | rhettinger | link | issue44276 messages |
2021-06-02 00:06:36 | rhettinger | create | |
|