Message350129
In PEP-567 there is a code example in `contextvars.Context` section (https://www.python.org/dev/peps/pep-0567/#contextvars-context):
```
# Print all context variables and their values in 'ctx':
print(ctx.items())
```
But `ctx.items()` doesn't return a list of tuples as probably expected by this code; instead it returns a `items` object which, unlike `dict_items`, does not contain any sensible `repr` or `str`. So this print statement will output something like `<items at 0x7f7fbd91e468>`.
I think this code example should be chaned to something like `print(list(ctx.items()))`. |
|
Date |
User |
Action |
Args |
2019-08-21 23:01:15 | MarSoft | set | recipients:
+ MarSoft, docs@python |
2019-08-21 23:01:15 | MarSoft | set | messageid: <1566428475.33.0.0889947555242.issue37911@roundup.psfhosted.org> |
2019-08-21 23:01:15 | MarSoft | link | issue37911 messages |
2019-08-21 23:01:15 | MarSoft | create | |
|