@@ -17,9 +17,8 @@ msgstr ""
17
17
"Generated-By : Babel 2.17.0\n "
18
18
19
19
#: ../../library/operator.rst:2
20
- #, fuzzy
21
20
msgid ":mod:`!operator` --- Standard operators as functions"
22
- msgstr ":mod:`operator` --- 함수로서의 표준 연산자"
21
+ msgstr ":mod:`! operator` --- 함수로서의 표준 연산자"
23
22
24
23
#: ../../library/operator.rst:9
25
24
msgid "**Source code:** :source:`Lib/operator.py`"
@@ -76,16 +75,15 @@ msgid ""
76
75
msgstr "논리 연산도 일반적으로 모든 객체에 적용 할 수 있으며, 진릿값 검사, 아이덴티티 검사 및 불리언 연산을 지원합니다:"
77
76
78
77
#: ../../library/operator.rst:61
79
- #, fuzzy
80
78
msgid ""
81
79
"Return the outcome of :keyword:`not` *obj*. (Note that there is no "
82
80
":meth:`!__not__` method for object instances; only the interpreter core "
83
81
"defines this operation. The result is affected by the "
84
82
":meth:`~object.__bool__` and :meth:`~object.__len__` methods.)"
85
83
msgstr ""
86
- ":keyword:`not` *obj*\\ 의 결과를 반환합니다. (객체 인스턴스에는 :meth:`__not__` 메서드가 없음에 "
87
- "유의하십시오; 인터프리터의 코어만이 이 연산을 정의합니다. 결과는 :meth:`__bool__`\\ 과 :meth:`__len__` "
88
- "메서드의 영향을 받습니다.)"
84
+ ":keyword:`not` *obj*\\ 의 결과를 반환합니다. (객체 인스턴스에는 :meth:`! __not__` 메서드가 없음에 "
85
+ "유의하십시오; 인터프리터의 코어만이 이 연산을 정의합니다. 결과는 :meth:`~object. __bool__`\\ 과 "
86
+ ":meth:`~object.__len__` 메서드의 영향을 받습니다.)"
89
87
90
88
#: ../../library/operator.rst:69
91
89
msgid ""
@@ -224,13 +222,12 @@ msgid "Set the value of *a* at index *b* to *c*."
224
222
msgstr "인덱스 *b*\\ 의 *a*\\ 의 값을 *c*\\ 로 설정합니다."
225
223
226
224
#: ../../library/operator.rst:247
227
- #, fuzzy
228
225
msgid ""
229
226
"Return an estimated length for the object *obj*. First try to return its "
230
227
"actual length, then an estimate using :meth:`object.__length_hint__`, and"
231
228
" finally return the default value."
232
229
msgstr ""
233
- "*o * 객체의 추정된 길이를 반환합니다. 먼저 실제 길이를 반환하려고 시도한 다음, "
230
+ "*obj * 객체의 추정된 길이를 반환합니다. 먼저 실제 길이를 반환하려고 시도한 다음, "
234
231
":meth:`object.__length_hint__`\\ 를 사용하여 추정치를 반환하려고 하고, 마지막으로 default 값을 "
235
232
"반환합니다."
236
233
@@ -240,7 +237,7 @@ msgstr ""
240
237
241
238
#: ../../library/operator.rst:259
242
239
msgid "Return ``obj(*args, **kwargs)``."
243
- msgstr ""
240
+ msgstr "``obj(*args, **kwargs)`` \\ 를 반환합니다. "
244
241
245
242
#: ../../library/operator.rst:264
246
243
msgid ""
@@ -306,16 +303,31 @@ msgid ""
306
303
" obj = getattr(obj, name)\n"
307
304
" return obj"
308
305
msgstr ""
306
+ "def attrgetter(*items):\n"
307
+ " if any(not isinstance(item, str) for item in items):\n"
308
+ " raise TypeError('attribute name must be a string')\n"
309
+ " if len(items) == 1:\n"
310
+ " attr = items[0]\n"
311
+ " def g(obj):\n"
312
+ " return resolve_attr(obj, attr)\n"
313
+ " else:\n"
314
+ " def g(obj):\n"
315
+ " return tuple(resolve_attr(obj, attr) for attr in items)\n"
316
+ " return g\n"
317
+ "\n"
318
+ "def resolve_attr(obj, attr):\n"
319
+ " for name in attr.split(\" .\" ):\n"
320
+ " obj = getattr(obj, name)\n"
321
+ " return obj"
309
322
310
323
#: ../../library/operator.rst:308
311
- #, fuzzy
312
324
msgid ""
313
325
"Return a callable object that fetches *item* from its operand using the "
314
326
"operand's :meth:`~object.__getitem__` method. If multiple items are "
315
327
"specified, returns a tuple of lookup values. For example:"
316
328
msgstr ""
317
- "피연산자의 :meth:`__getitem__` 메서드를 사용하여 피연산자에서 *item*\\ 을 꺼내는 콜러블 객체를 반환합니다. "
318
- "여러 항목이 지정되면, 조회 값의 튜플을 반환합니다. 예를 들어:"
329
+ "피연산자의 :meth:`~object. __getitem__` 메서드를 사용하여 피연산자에서 *item*\\ 을 꺼내는 콜러블 객체를 "
330
+ "반환합니다. 여러 항목이 지정되면, 조회 값의 튜플을 반환합니다. 예를 들어:"
319
331
320
332
#: ../../library/operator.rst:312
321
333
msgid "After ``f = itemgetter(2)``, the call ``f(r)`` returns ``r[2]``."
@@ -341,17 +353,25 @@ msgid ""
341
353
" return tuple(obj[item] for item in items)\n"
342
354
" return g"
343
355
msgstr ""
356
+ "def itemgetter(*items):\n"
357
+ " if len(items) == 1:\n"
358
+ " item = items[0]\n"
359
+ " def g(obj):\n"
360
+ " return obj[item]\n"
361
+ " else:\n"
362
+ " def g(obj):\n"
363
+ " return tuple(obj[item] for item in items)\n"
364
+ " return g"
344
365
345
366
#: ../../library/operator.rst:329
346
- #, fuzzy
347
367
msgid ""
348
368
"The items can be any type accepted by the operand's "
349
369
":meth:`~object.__getitem__` method. Dictionaries accept any "
350
370
":term:`hashable` value. Lists, tuples, and strings accept an index or a "
351
371
"slice:"
352
372
msgstr ""
353
- "항목은 피연산자의 :meth:`__getitem__` 메서드에서 허용되는 모든 형이 될 수 있습니다. 딕셔너리는 모든 해시 가능 "
354
- "값을 허용합니다. 리스트, 튜플 및 문자열은 인덱스나 슬라이스를 허용합니다:"
373
+ "항목은 피연산자의 :meth:`~object. __getitem__` 메서드에서 허용되는 모든 형이 될 수 있습니다. 딕셔너리는 모든"
374
+ " :term:`해시 가능 <hashable>` 값을 허용합니다. 리스트, 튜플 및 문자열은 인덱스나 슬라이스를 허용합니다:"
355
375
356
376
#: ../../library/operator.rst:343
357
377
msgid ""
@@ -389,6 +409,10 @@ msgid ""
389
409
" return getattr(obj, name)(*args, **kwargs)\n"
390
410
" return caller"
391
411
msgstr ""
412
+ "def methodcaller(name, /, *args, **kwargs):\n"
413
+ " def caller(obj):\n"
414
+ " return getattr(obj, name)(*args, **kwargs)\n"
415
+ " return caller"
392
416
393
417
#: ../../library/operator.rst:376
394
418
msgid "Mapping Operators to Functions"
0 commit comments