From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Thu, 14 Nov 2024 05:08:18 +0000 (+0100) Subject: [3.12] gh-126731: Update outdated project information in `pprint.pp` doc (GH-126732... X-Git-Tag: v3.12.8~67 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3ed99b3eb3fe75c9562c95f5322c6e7f130ab266;p=thirdparty%2FPython%2Fcpython.git [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 6a93a1adbb56a64ec6d20e8aab911439998502c9) Co-authored-by: Wulian --- diff --git a/Doc/library/pprint.rst b/Doc/library/pprint.rst index 1b3498e51f76..2985f31bacb4 100644 --- a/Doc/library/pprint.rst +++ b/Doc/library/pprint.rst @@ -267,7 +267,7 @@ let's fetch information about a project from `PyPI `_:: >>> 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::