@@ -83,6 +83,10 @@ msgid ""
8383"`print` function for inspecting values. Tip: you can reassign ``print = "
8484"pprint.pp`` for use within a scope."
8585msgstr ""
86+ "*object* のフォーマットされた表現を出力して、その後に newline を続けます。こ"
87+ "の関数は、対話型インタプリタの中で値を調査するために :func:`print` 関数の代わ"
88+ "りに使用されることがあります。Tips: さらに、スコープ内で使用するために "
89+ "``print = pprint.pp`` を再代入することができます)。"
8690
8791#: ../../library/pprint.rst:0
8892msgid "Parameters"
@@ -100,14 +104,16 @@ msgstr ""
100104
101105#: ../../library/pprint.rst:55
102106msgid "The amount of indentation added for each nesting level."
103- msgstr ""
107+ msgstr "入れ子レベルごとに追加されるインデントの量を指定します。 "
104108
105109#: ../../library/pprint.rst:58
106110msgid ""
107111"The desired maximum number of characters per line in the output. If a "
108112"structure cannot be formatted within the width constraint, a best effort "
109113"will be made."
110114msgstr ""
115+ "出力の1行あたり最大文字数を指定します。構造が幅の制約の中で整形できない場合、"
116+ "最善の努力がなされます。"
111117
112118#: ../../library/pprint.rst:63
113119msgid ""
@@ -116,6 +122,9 @@ msgid ""
116122"If ``None`` (the default), there is no constraint on the depth of the "
117123"objects being formatted."
118124msgstr ""
125+ "表示される入れ子レベルの数を制御します。表示されるデータ構造が深すぎる場合、"
126+ "含まれる次のレベルは``...``で置き換えられます。``None`` (デフォルト)の場"
127+ "合、フォーマットされるオブジェクトの深さに制約はありません。"
119128
120129#: ../../library/pprint.rst:71
121130msgid ""
@@ -130,12 +139,16 @@ msgid ""
130139"If ``True``, dictionaries will be formatted with their keys sorted, "
131140"otherwise they will be displayed in insertion order (the default)."
132141msgstr ""
142+ "Trueの場合、辞書は辞書のキー順にソートされて整形されます。そうでなければ挿入"
143+ "順に表示されます(デフォルト)。"
133144
134145#: ../../library/pprint.rst:83
135146msgid ""
136147"If ``True``, integers will be formatted with the ``_`` character for a "
137148"thousands separator, otherwise underscores are not displayed (the default)."
138149msgstr ""
150+ "Trueの場合、整数は``_``で3桁区切りされて表示されます。そうでなければアンダー"
151+ "スコアは表示されません(デフォルト)。"
139152
140153#: ../../library/pprint.rst:105
141154msgid ""
@@ -307,6 +320,8 @@ msgid ""
307320"parameters, let's fetch information about a project from `PyPI <https://pypi."
308321"org>`_::"
309322msgstr ""
323+ ":func:`~pprint.pp` 関数のいくつかの用途とそのパラメータを実証するために、"
324+ "`PyPI <https://pypi.org>`_ からプロジェクトに関する情報を取って来ましょう::"
310325
311326#: ../../library/pprint.rst:267
312327msgid ""
@@ -316,10 +331,15 @@ msgid ""
316331">>> with urlopen('https://pypi.org/pypi/sampleproject/1.2.0/json') as resp:\n"
317332"... project_info = json.load(resp)['info']"
318333msgstr ""
334+ ">>> import json\n"
335+ ">>> import pprint\n"
336+ ">>> from urllib.request import urlopen\n"
337+ ">>> with urlopen('https://pypi.org/pypi/sampleproject/1.2.0/json') as resp:\n"
338+ "... project_info = json.load(resp)['info']"
319339
320340#: ../../library/pprint.rst:273
321341msgid "In its basic form, :func:`~pprint.pp` shows the whole object::"
322- msgstr ""
342+ msgstr "その基本形式では、 :func:`~pprint.pp` はオブジェクト全体を表示します:: "
323343
324344#: ../../library/pprint.rst:275
325345msgid ""
@@ -380,6 +400,62 @@ msgid ""
380400" 'summary': 'A sample Python project',\n"
381401" 'version': '1.2.0'}"
382402msgstr ""
403+ ">>> pprint.pp(project_info)\n"
404+ "{'author': 'The Python Packaging Authority',\n"
405+ " 'author_email': 'pypa-dev@googlegroups.com',\n"
406+ " 'bugtrack_url': None,\n"
407+ " 'classifiers': ['Development Status :: 3 - Alpha',\n"
408+ " 'Intended Audience :: Developers',\n"
409+ " 'License :: OSI Approved :: MIT License',\n"
410+ " 'Programming Language :: Python :: 2',\n"
411+ " 'Programming Language :: Python :: 2.6',\n"
412+ " 'Programming Language :: Python :: 2.7',\n"
413+ " 'Programming Language :: Python :: 3',\n"
414+ " 'Programming Language :: Python :: 3.2',\n"
415+ " 'Programming Language :: Python :: 3.3',\n"
416+ " 'Programming Language :: Python :: 3.4',\n"
417+ " 'Topic :: Software Development :: Build Tools'],\n"
418+ " 'description': 'A sample Python project\\ n'\n"
419+ " '=======================\\ n'\n"
420+ " '\\ n'\n"
421+ " 'This is the description file for the project.\\ n'\n"
422+ " '\\ n'\n"
423+ " 'The file should use UTF-8 encoding and be written using '\n"
424+ " 'ReStructured Text. It\\ n'\n"
425+ " 'will be used to generate the project webpage on PyPI, and "
426+ "'\n"
427+ " 'should be written for\\ n'\n"
428+ " 'that purpose.\\ n'\n"
429+ " '\\ n'\n"
430+ " 'Typical contents for this file would include an overview of "
431+ "'\n"
432+ " 'the project, basic\\ n'\n"
433+ " 'usage examples, etc. Generally, including the project '\n"
434+ " 'changelog in here is not\\ n'\n"
435+ " 'a good idea, although a simple \" What\\ 's New\" section for "
436+ "the '\n"
437+ " 'most recent version\\ n'\n"
438+ " 'may be appropriate.',\n"
439+ " 'description_content_type': None,\n"
440+ " 'docs_url': None,\n"
441+ " 'download_url': 'UNKNOWN',\n"
442+ " 'downloads': {'last_day': -1, 'last_month': -1, 'last_week': -1},\n"
443+ " 'home_page': 'https://github.com/pypa/sampleproject',\n"
444+ " 'keywords': 'sample setuptools development',\n"
445+ " 'license': 'MIT',\n"
446+ " 'maintainer': None,\n"
447+ " 'maintainer_email': None,\n"
448+ " 'name': 'sampleproject',\n"
449+ " 'package_url': 'https://pypi.org/project/sampleproject/',\n"
450+ " 'platform': 'UNKNOWN',\n"
451+ " 'project_url': 'https://pypi.org/project/sampleproject/',\n"
452+ " 'project_urls': {'Download': 'UNKNOWN',\n"
453+ " 'Homepage': 'https://github.com/pypa/sampleproject'},\n"
454+ " 'release_url': 'https://pypi.org/project/sampleproject/1.2.0/',\n"
455+ " 'requires_dist': None,\n"
456+ " 'requires_python': None,\n"
457+ " 'summary': 'A sample Python project',\n"
458+ " 'version': '1.2.0'}"
383459
384460#: ../../library/pprint.rst:329
385461msgid ""
@@ -437,6 +513,51 @@ msgid ""
437513" 'summary': 'A sample Python project',\n"
438514" 'version': '1.2.0'}"
439515msgstr ""
516+ ">>> pprint.pp(project_info, depth=1)\n"
517+ "{'author': 'The Python Packaging Authority',\n"
518+ " 'author_email': 'pypa-dev@googlegroups.com',\n"
519+ " 'bugtrack_url': None,\n"
520+ " 'classifiers': [...],\n"
521+ " 'description': 'A sample Python project\\ n'\n"
522+ " '=======================\\ n'\n"
523+ " '\\ n'\n"
524+ " 'This is the description file for the project.\\ n'\n"
525+ " '\\ n'\n"
526+ " 'The file should use UTF-8 encoding and be written using '\n"
527+ " 'ReStructured Text. It\\ n'\n"
528+ " 'will be used to generate the project webpage on PyPI, and "
529+ "'\n"
530+ " 'should be written for\\ n'\n"
531+ " 'that purpose.\\ n'\n"
532+ " '\\ n'\n"
533+ " 'Typical contents for this file would include an overview of "
534+ "'\n"
535+ " 'the project, basic\\ n'\n"
536+ " 'usage examples, etc. Generally, including the project '\n"
537+ " 'changelog in here is not\\ n'\n"
538+ " 'a good idea, although a simple \" What\\ 's New\" section for "
539+ "the '\n"
540+ " 'most recent version\\ n'\n"
541+ " 'may be appropriate.',\n"
542+ " 'description_content_type': None,\n"
543+ " 'docs_url': None,\n"
544+ " 'download_url': 'UNKNOWN',\n"
545+ " 'downloads': {...},\n"
546+ " 'home_page': 'https://github.com/pypa/sampleproject',\n"
547+ " 'keywords': 'sample setuptools development',\n"
548+ " 'license': 'MIT',\n"
549+ " 'maintainer': None,\n"
550+ " 'maintainer_email': None,\n"
551+ " 'name': 'sampleproject',\n"
552+ " 'package_url': 'https://pypi.org/project/sampleproject/',\n"
553+ " 'platform': 'UNKNOWN',\n"
554+ " 'project_url': 'https://pypi.org/project/sampleproject/',\n"
555+ " 'project_urls': {...},\n"
556+ " 'release_url': 'https://pypi.org/project/sampleproject/1.2.0/',\n"
557+ " 'requires_dist': None,\n"
558+ " 'requires_python': None,\n"
559+ " 'summary': 'A sample Python project',\n"
560+ " 'version': '1.2.0'}"
440561
441562#: ../../library/pprint.rst:375
442563msgid ""
@@ -494,6 +615,51 @@ msgid ""
494615" 'summary': 'A sample Python project',\n"
495616" 'version': '1.2.0'}"
496617msgstr ""
618+ ">>> pprint.pp(project_info, depth=1, width=60)\n"
619+ "{'author': 'The Python Packaging Authority',\n"
620+ " 'author_email': 'pypa-dev@googlegroups.com',\n"
621+ " 'bugtrack_url': None,\n"
622+ " 'classifiers': [...],\n"
623+ " 'description': 'A sample Python project\\ n'\n"
624+ " '=======================\\ n'\n"
625+ " '\\ n'\n"
626+ " 'This is the description file for the '\n"
627+ " 'project.\\ n'\n"
628+ " '\\ n'\n"
629+ " 'The file should use UTF-8 encoding and be '\n"
630+ " 'written using ReStructured Text. It\\ n'\n"
631+ " 'will be used to generate the project '\n"
632+ " 'webpage on PyPI, and should be written '\n"
633+ " 'for\\ n'\n"
634+ " 'that purpose.\\ n'\n"
635+ " '\\ n'\n"
636+ " 'Typical contents for this file would '\n"
637+ " 'include an overview of the project, '\n"
638+ " 'basic\\ n'\n"
639+ " 'usage examples, etc. Generally, including '\n"
640+ " 'the project changelog in here is not\\ n'\n"
641+ " 'a good idea, although a simple \" What\\ 's '\n"
642+ " 'New\" section for the most recent version\\ n'\n"
643+ " 'may be appropriate.',\n"
644+ " 'description_content_type': None,\n"
645+ " 'docs_url': None,\n"
646+ " 'download_url': 'UNKNOWN',\n"
647+ " 'downloads': {...},\n"
648+ " 'home_page': 'https://github.com/pypa/sampleproject',\n"
649+ " 'keywords': 'sample setuptools development',\n"
650+ " 'license': 'MIT',\n"
651+ " 'maintainer': None,\n"
652+ " 'maintainer_email': None,\n"
653+ " 'name': 'sampleproject',\n"
654+ " 'package_url': 'https://pypi.org/project/sampleproject/',\n"
655+ " 'platform': 'UNKNOWN',\n"
656+ " 'project_url': 'https://pypi.org/project/sampleproject/',\n"
657+ " 'project_urls': {...},\n"
658+ " 'release_url': 'https://pypi.org/project/sampleproject/1.2.0/',\n"
659+ " 'requires_dist': None,\n"
660+ " 'requires_python': None,\n"
661+ " 'summary': 'A sample Python project',\n"
662+ " 'version': '1.2.0'}"
497663
498664#: ../../library/pprint.rst:121 ../../library/pprint.rst:224
499665msgid "built-in function"
0 commit comments