This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author MarSoft
Recipients MarSoft, docs@python
Date 2019-08-21.23:01:15
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1566428475.33.0.0889947555242.issue37911@roundup.psfhosted.org>
In-reply-to
Content
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()))`.
History
Date User Action Args
2019-08-21 23:01:15MarSoftsetrecipients: + MarSoft, docs@python
2019-08-21 23:01:15MarSoftsetmessageid: <1566428475.33.0.0889947555242.issue37911@roundup.psfhosted.org>
2019-08-21 23:01:15MarSoftlinkissue37911 messages
2019-08-21 23:01:15MarSoftcreate