@@ -17,22 +17,20 @@ msgstr ""
17
17
"Generated-By : Babel 2.17.0\n "
18
18
19
19
#: ../../library/reprlib.rst:2
20
- #, fuzzy
21
20
msgid ":mod:`!reprlib` --- Alternate :func:`repr` implementation"
22
- msgstr ":mod:`reprlib` --- 대안 :func:`repr` 구현"
21
+ msgstr ":mod:`! reprlib` --- 대안 :func:`repr` 구현"
23
22
24
23
#: ../../library/reprlib.rst:9
25
24
msgid "**Source code:** :source:`Lib/reprlib.py`"
26
25
msgstr "**소스 코드:** :source:`Lib/reprlib.py`"
27
26
28
27
#: ../../library/reprlib.rst:13
29
- #, fuzzy
30
28
msgid ""
31
29
"The :mod:`!reprlib` module provides a means for producing object "
32
30
"representations with limits on the size of the resulting strings. This is"
33
31
" used in the Python debugger and may be useful in other contexts as well."
34
32
msgstr ""
35
- ":mod:`reprlib` 모듈은 결과 문자열의 크기에 제한이 있는 객체 표현을 생성하는 수단을 제공합니다. 파이썬 디버거에서 "
33
+ ":mod:`! reprlib` 모듈은 결과 문자열의 크기에 제한이 있는 객체 표현을 생성하는 수단을 제공합니다. 파이썬 디버거에서 "
36
34
"사용되며 다른 문맥에서도 유용할 수 있습니다."
37
35
38
36
#: ../../library/reprlib.rst:17
@@ -58,7 +56,7 @@ msgstr ""
58
56
59
57
#: ../../library/reprlib.rst:32
60
58
msgid "aRepr = reprlib.Repr(maxlevel=3)"
61
- msgstr ""
59
+ msgstr "aRepr = reprlib.Repr(maxlevel=3) "
62
60
63
61
#: ../../library/reprlib.rst:34
64
62
msgid "Is equivalent to::"
@@ -69,6 +67,8 @@ msgid ""
69
67
"aRepr = reprlib.Repr()\n"
70
68
"aRepr.maxlevel = 3"
71
69
msgstr ""
70
+ "aRepr = reprlib.Repr()\n"
71
+ "aRepr.maxlevel = 3"
72
72
73
73
#: ../../library/reprlib.rst:39
74
74
msgid ""
@@ -100,25 +100,24 @@ msgstr ""
100
100
"반환하지만, 대부분의 크기에는 제한이 있습니다."
101
101
102
102
#: ../../library/reprlib.rst:60
103
- #, fuzzy
104
103
msgid ""
105
104
"In addition to size-limiting tools, the module also provides a decorator "
106
105
"for detecting recursive calls to :meth:`~object.__repr__` and "
107
106
"substituting a placeholder string instead."
108
107
msgstr ""
109
- "크기 제한 도구 외에도, 모듈은 :meth:`__repr__`\\ 에 대한 재귀 호출을 감지하고 대신 자리 표시자 문자열을 치환하는 "
110
- "데코레이터를 제공합니다."
108
+ "크기 제한 도구 외에도, 모듈은 :meth:`~object. __repr__`\\ 에 대한 재귀 호출을 감지하고 대신 자리 표시자 "
109
+ "문자열을 치환하는 데코레이터를 제공합니다."
111
110
112
111
#: ../../library/reprlib.rst:69
113
- #, fuzzy
114
112
msgid ""
115
113
"Decorator for :meth:`~object.__repr__` methods to detect recursive calls "
116
114
"within the same thread. If a recursive call is made, the *fillvalue* is "
117
115
"returned, otherwise, the usual :meth:`!__repr__` call is made. For "
118
116
"example:"
119
117
msgstr ""
120
- "같은 스레드 내에서의 재귀 호출을 감지하는 :meth:`__repr__` 메서드용 데코레이터. 재귀 호출이 이루어지면, "
121
- "*fillvalue*\\ 가 반환되고, 그렇지 않으면 평상시의 :meth:`__repr__` 호출이 수행됩니다. 예를 들어:"
118
+ "같은 스레드 내에서의 재귀 호출을 감지하는 :meth:`~object.__repr__` 메서드용 데코레이터. 재귀 호출이 "
119
+ "이루어지면, *fillvalue*\\ 가 반환되고, 그렇지 않으면 평상시의 :meth:`!__repr__` 호출이 수행됩니다. 예를 "
120
+ "들어:"
122
121
123
122
#: ../../library/reprlib.rst:73
124
123
msgid ""
@@ -134,6 +133,17 @@ msgid ""
134
133
">>> print(m)\n"
135
134
"<'a'|'b'|'c'|...|'x'>"
136
135
msgstr ""
136
+ ">>> from reprlib import recursive_repr\n"
137
+ ">>> class MyList(list):\n"
138
+ "... @recursive_repr()\n"
139
+ "... def __repr__(self):\n"
140
+ "... return '<' + '|'.join(map(repr, self)) + '>'\n"
141
+ "...\n"
142
+ ">>> m = MyList('abc')\n"
143
+ ">>> m.append(m)\n"
144
+ ">>> m.append('x')\n"
145
+ ">>> print(m)\n"
146
+ "<'a'|'b'|'c'|...|'x'>"
137
147
138
148
#: ../../library/reprlib.rst:93
139
149
msgid "Repr Objects"
@@ -212,6 +222,13 @@ msgid ""
212
222
">>> print(aRepr.repr(example))\n"
213
223
"[1, 'spam', {'a': 2, 'b': 'spam eggs', 'c': {3: 4.5, 6: []}}, 'ham']"
214
224
msgstr ""
225
+ ">>> example = [\n"
226
+ "... 1, 'spam', {'a': 2, 'b': 'spam eggs', 'c': {3: 4.5, 6: []}}, "
227
+ "'ham']\n"
228
+ ">>> import reprlib\n"
229
+ ">>> aRepr = reprlib.Repr()\n"
230
+ ">>> print(aRepr.repr(example))\n"
231
+ "[1, 'spam', {'a': 2, 'b': 'spam eggs', 'c': {3: 4.5, 6: []}}, 'ham']"
215
232
216
233
#: ../../library/reprlib.rst:162
217
234
msgid ""
@@ -238,6 +255,21 @@ msgid ""
238
255
"-->'ham',\n"
239
256
"]"
240
257
msgstr ""
258
+ ">>> aRepr.indent = '-->'\n"
259
+ ">>> print(aRepr.repr(example))\n"
260
+ "[\n"
261
+ "-->1,\n"
262
+ "-->'spam',\n"
263
+ "-->{\n"
264
+ "-->-->'a': 2,\n"
265
+ "-->-->'b': 'spam eggs',\n"
266
+ "-->-->'c': {\n"
267
+ "-->-->-->3: 4.5,\n"
268
+ "-->-->-->6: [],\n"
269
+ "-->-->},\n"
270
+ "-->},\n"
271
+ "-->'ham',\n"
272
+ "]"
241
273
242
274
#: ../../library/reprlib.rst:183
243
275
msgid ""
@@ -264,6 +296,21 @@ msgid ""
264
296
" 'ham',\n"
265
297
"]"
266
298
msgstr ""
299
+ ">>> aRepr.indent = 4\n"
300
+ ">>> print(aRepr.repr(example))\n"
301
+ "[\n"
302
+ " 1,\n"
303
+ " 'spam',\n"
304
+ " {\n"
305
+ " 'a': 2,\n"
306
+ " 'b': 'spam eggs',\n"
307
+ " 'c': {\n"
308
+ " 3: 4.5,\n"
309
+ " 6: [],\n"
310
+ " },\n"
311
+ " },\n"
312
+ " 'ham',\n"
313
+ "]"
267
314
268
315
#: ../../library/reprlib.rst:209
269
316
msgid ""
@@ -301,7 +348,6 @@ msgid "Subclassing Repr Objects"
301
348
msgstr "Repr 객체 서브 클래싱"
302
349
303
350
#: ../../library/reprlib.rst:236
304
- #, fuzzy
305
351
msgid ""
306
352
"The use of dynamic dispatching by :meth:`Repr.repr1` allows subclasses of"
307
353
" :class:`Repr` to add support for additional built-in object types or to "
@@ -310,7 +356,7 @@ msgid ""
310
356
msgstr ""
311
357
":meth:`Repr.repr1`\\ 에 의한 동적 디스패치의 사용은 :class:`Repr`\\ 의 서브 클래스가 추가 내장 객체 "
312
358
"형에 대한 지원을 추가하거나 이미 지원되는 형의 처리를 수정할 수 있도록 합니다. 이 예제는 파일 객체에 대한 특별한 지원이 어떻게"
313
- " 추가될 수 있는지 보여줍니다:: "
359
+ " 추가될 수 있는지 보여줍니다:"
314
360
315
361
#: ../../library/reprlib.rst:241
316
362
#, python-brace-format
@@ -328,16 +374,28 @@ msgid ""
328
374
"aRepr = MyRepr()\n"
329
375
"print(aRepr.repr(sys.stdin)) # prints '<stdin>'"
330
376
msgstr ""
377
+ "import reprlib\n"
378
+ "import sys\n"
379
+ "\n"
380
+ "class MyRepr(reprlib.Repr):\n"
381
+ "\n"
382
+ " def repr_TextIOWrapper(self, obj, level):\n"
383
+ " if obj.name in {'<stdin>', '<stdout>', '<stderr>'}:\n"
384
+ " return obj.name\n"
385
+ " return repr(obj)\n"
386
+ "\n"
387
+ "aRepr = MyRepr()\n"
388
+ "print(aRepr.repr(sys.stdin)) # '<stdin>' 을 인쇄합니다"
331
389
332
390
#: ../../library/reprlib.rst:256
333
391
msgid "<stdin>"
334
- msgstr ""
392
+ msgstr "<stdin> "
335
393
336
394
#: ../../library/reprlib.rst:65
337
395
msgid "..."
338
- msgstr ""
396
+ msgstr "... "
339
397
340
398
#: ../../library/reprlib.rst:65
341
399
msgid "placeholder"
342
- msgstr ""
400
+ msgstr "자리 표시자 "
343
401
0 commit comments