Kaydet (Commit) 75e86a67 authored tarafından Éric Araujo's avatar Éric Araujo

Merge 3.1

......@@ -193,7 +193,7 @@ Example
-------
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
......@@ -201,8 +201,8 @@ let's fetch information about a package from PyPI::
>>> 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::
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment