[Python-checkins] cpython (3.1): Don’t misuse “package data” in pprint example
eric.araujo
python-checkins at python.org
Sun May 29 18:14:32 CEST 2011
http://hg.python.org/cpython/rev/44934c1ec145
changeset: 70492:44934c1ec145
branch: 3.1
parent: 70485:1c8882fb6cfe
user: Éric Araujo <merwok at netwok.org>
date: Sun May 29 03:46:31 2011 +0200
summary:
Don’t misuse “package data” in pprint example
files:
Doc/library/pprint.rst | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/Doc/library/pprint.rst b/Doc/library/pprint.rst
--- a/Doc/library/pprint.rst
+++ b/Doc/library/pprint.rst
@@ -192,7 +192,7 @@
-------
To demonstrate several uses of the :func:`pprint` function and its parameters,
-let's fetch information about a package from PyPI::
+let's fetch information about a project from PyPI::
>>> import json
>>> import pprint
@@ -200,8 +200,8 @@
>>> with urlopen('http://pypi.python.org/pypi/configparser/json') as url:
... http_info = url.info()
... raw_data = url.read().decode(http_info.get_content_charset())
- >>> package_data = json.loads(raw_data)
- >>> result = {'headers': http_info.items(), 'body': package_data}
+ >>> project_info = json.loads(raw_data)
+ >>> result = {'headers': http_info.items(), 'body': project_info}
In its basic form, :func:`pprint` shows the whole object::
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list