11# SOME DESCRIPTIVE TITLE.
2- # Copyright (C) 2001-2023 , Python Software Foundation
2+ # Copyright (C) 2001-2024 , Python Software Foundation
33# This file is distributed under the same license as the Python package.
44# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
55#
66# Translators:
7- # Transifex Bot < >, 2023
7+ # Wiktor Matuszewski <[email protected] >, 2024 88#
99#, fuzzy
1010msgid ""
1111msgstr ""
12- "Project-Id-Version : Python 3.11 \n "
12+ "Project-Id-Version : Python 3.13 \n "
1313"Report-Msgid-Bugs-To : \n "
14- "POT-Creation-Date : 2023-05-19 14:13 +0000\n "
14+ "POT-Creation-Date : 2024-08-31 10:59 +0000\n "
1515"PO-Revision-Date : 2021-06-28 01:12+0000\n "
16- "Last-Translator : Transifex Bot < >, 2023 \n "
16+ "
Last-Translator :
Wiktor Matuszewski <[email protected] >, 2024 \n"
1717"Language-Team : Polish (https://app.transifex.com/python-doc/teams/5390/pl/)\n "
1818"MIME-Version : 1.0\n "
1919"Content-Type : text/plain; charset=UTF-8\n "
@@ -23,14 +23,14 @@ msgstr ""
2323"(n%100<12 || n%100>14) ? 1 : n!=1 && (n%10>=0 && n%10<=1) || (n%10>=5 && "
2424"n%10<=9) || (n%100>=12 && n%100<=14) ? 2 : 3);\n "
2525
26- msgid ":mod:`reprlib` --- Alternate :func:`repr` implementation"
26+ msgid ":mod:`! reprlib` --- Alternate :func:`repr` implementation"
2727msgstr ""
2828
2929msgid "**Source code:** :source:`Lib/reprlib.py`"
3030msgstr ""
3131
3232msgid ""
33- "The :mod:`reprlib` module provides a means for producing object "
33+ "The :mod:`! reprlib` module provides a means for producing object "
3434"representations with limits on the size of the resulting strings. This is "
3535"used in the Python debugger and may be useful in other contexts as well."
3636msgstr ""
@@ -45,6 +45,31 @@ msgid ""
4545"excessively long."
4646msgstr ""
4747
48+ msgid ""
49+ "The keyword arguments of the constructor can be used as a shortcut to set "
50+ "the attributes of the :class:`Repr` instance. Which means that the following "
51+ "initialization::"
52+ msgstr ""
53+
54+ msgid "aRepr = reprlib.Repr(maxlevel=3)"
55+ msgstr ""
56+
57+ msgid "Is equivalent to::"
58+ msgstr ""
59+
60+ msgid ""
61+ "aRepr = reprlib.Repr()\n"
62+ "aRepr.maxlevel = 3"
63+ msgstr ""
64+
65+ msgid ""
66+ "See section `Repr Objects`_ for more information about :class:`Repr` "
67+ "attributes."
68+ msgstr ""
69+
70+ msgid "Allow attributes to be set via keyword arguments."
71+ msgstr ""
72+
4873msgid ""
4974"This is an instance of :class:`Repr` which is used to provide the :func:`."
5075"repr` function described below. Changing the attributes of this object will "
@@ -59,14 +84,28 @@ msgstr ""
5984
6085msgid ""
6186"In addition to size-limiting tools, the module also provides a decorator for "
62- "detecting recursive calls to :meth:`__repr__` and substituting a placeholder "
63- "string instead."
87+ "detecting recursive calls to :meth:`~object.__repr__` and substituting a "
88+ "placeholder string instead."
89+ msgstr ""
90+
91+ msgid ""
92+ "Decorator for :meth:`~object.__repr__` methods to detect recursive calls "
93+ "within the same thread. If a recursive call is made, the *fillvalue* is "
94+ "returned, otherwise, the usual :meth:`!__repr__` call is made. For example:"
6495msgstr ""
6596
6697msgid ""
67- "Decorator for :meth:`__repr__` methods to detect recursive calls within the "
68- "same thread. If a recursive call is made, the *fillvalue* is returned, "
69- "otherwise, the usual :meth:`__repr__` call is made. For example:"
98+ ">>> from reprlib import recursive_repr\n"
99+ ">>> class MyList(list):\n"
100+ "... @recursive_repr()\n"
101+ "... def __repr__(self):\n"
102+ "... return '<' + '|'.join(map(repr, self)) + '>'\n"
103+ "...\n"
104+ ">>> m = MyList('abc')\n"
105+ ">>> m.append(m)\n"
106+ ">>> m.append('x')\n"
107+ ">>> print(m)\n"
108+ "<'a'|'b'|'c'|...|'x'>"
70109msgstr ""
71110
72111msgid "Repr Objects"
@@ -111,6 +150,67 @@ msgid ""
111150"a similar manner as :attr:`maxstring`. The default is ``20``."
112151msgstr ""
113152
153+ msgid ""
154+ "If this attribute is set to ``None`` (the default), the output is formatted "
155+ "with no line breaks or indentation, like the standard :func:`repr`. For "
156+ "example:"
157+ msgstr ""
158+
159+ msgid ""
160+ ">>> example = [\n"
161+ "... 1, 'spam', {'a': 2, 'b': 'spam eggs', 'c': {3: 4.5, 6: []}}, 'ham']\n"
162+ ">>> import reprlib\n"
163+ ">>> aRepr = reprlib.Repr()\n"
164+ ">>> print(aRepr.repr(example))\n"
165+ "[1, 'spam', {'a': 2, 'b': 'spam eggs', 'c': {3: 4.5, 6: []}}, 'ham']"
166+ msgstr ""
167+
168+ msgid ""
169+ "If :attr:`~Repr.indent` is set to a string, each recursion level is placed "
170+ "on its own line, indented by that string:"
171+ msgstr ""
172+
173+ msgid ""
174+ ">>> aRepr.indent = '-->'\n"
175+ ">>> print(aRepr.repr(example))\n"
176+ "[\n"
177+ "-->1,\n"
178+ "-->'spam',\n"
179+ "-->{\n"
180+ "-->-->'a': 2,\n"
181+ "-->-->'b': 'spam eggs',\n"
182+ "-->-->'c': {\n"
183+ "-->-->-->3: 4.5,\n"
184+ "-->-->-->6: [],\n"
185+ "-->-->},\n"
186+ "-->},\n"
187+ "-->'ham',\n"
188+ "]"
189+ msgstr ""
190+
191+ msgid ""
192+ "Setting :attr:`~Repr.indent` to a positive integer value behaves as if it "
193+ "was set to a string with that number of spaces:"
194+ msgstr ""
195+
196+ msgid ""
197+ ">>> aRepr.indent = 4\n"
198+ ">>> print(aRepr.repr(example))\n"
199+ "[\n"
200+ " 1,\n"
201+ " 'spam',\n"
202+ " {\n"
203+ " 'a': 2,\n"
204+ " 'b': 'spam eggs',\n"
205+ " 'c': {\n"
206+ " 3: 4.5,\n"
207+ " 6: [],\n"
208+ " },\n"
209+ " },\n"
210+ " 'ham',\n"
211+ "]"
212+ msgstr ""
213+
114214msgid ""
115215"The equivalent to the built-in :func:`repr` that uses the formatting imposed "
116216"by the instance."
@@ -139,11 +239,29 @@ msgid ""
139239"The use of dynamic dispatching by :meth:`Repr.repr1` allows subclasses of :"
140240"class:`Repr` to add support for additional built-in object types or to "
141241"modify the handling of types already supported. This example shows how "
142- "special support for file objects could be added:: "
242+ "special support for file objects could be added:"
143243msgstr ""
144244
145- msgid "..."
245+ msgid ""
246+ "import reprlib\n"
247+ "import sys\n"
248+ "\n"
249+ "class MyRepr(reprlib.Repr):\n"
250+ "\n"
251+ " def repr_TextIOWrapper(self, obj, level):\n"
252+ " if obj.name in {'<stdin>', '<stdout>', '<stderr>'}:\n"
253+ " return obj.name\n"
254+ " return repr(obj)\n"
255+ "\n"
256+ "aRepr = MyRepr()\n"
257+ "print(aRepr.repr(sys.stdin)) # prints '<stdin>'"
258+ msgstr ""
259+
260+ msgid "<stdin>"
146261msgstr ""
147262
263+ msgid "..."
264+ msgstr "..."
265+
148266msgid "placeholder"
149267msgstr ""
0 commit comments