mirror of
https://github.com/python/cpython.git
synced 2025-12-31 04:23:37 +00:00
[3.12] gh-126731: Update outdated project information in pprint.pp doc (GH-126732) (#126819)
gh-126731: Update outdated project information in `pprint.pp` doc (GH-126732)
(cherry picked from commit 6a93a1adbb)
Co-authored-by: Wulian <xiguawulian@gmail.com>
This commit is contained in:
parent
49e212a929
commit
3ed99b3eb3
1 changed files with 1 additions and 1 deletions
|
|
@ -267,7 +267,7 @@ let's fetch information about a project from `PyPI <https://pypi.org>`_::
|
|||
>>> import json
|
||||
>>> import pprint
|
||||
>>> from urllib.request import urlopen
|
||||
>>> with urlopen('https://pypi.org/pypi/sampleproject/json') as resp:
|
||||
>>> with urlopen('https://pypi.org/pypi/sampleproject/1.2.0/json') as resp:
|
||||
... project_info = json.load(resp)['info']
|
||||
|
||||
In its basic form, :func:`~pprint.pp` shows the whole object::
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue