3
3
# This file is distributed under the same license as the Python package.
4
4
# FIRST AUTHOR <EMAIL@ADDRESS>, 2017.
5
5
#
6
- #, fuzzy
7
6
msgid ""
8
7
msgstr ""
9
8
"Project-Id-Version : Python 3.6\n "
@@ -18,9 +17,8 @@ msgstr ""
18
17
"Generated-By : Babel 2.17.0\n "
19
18
20
19
#: ../../library/atexit.rst:2
21
- #, fuzzy
22
20
msgid ":mod:`!atexit` --- Exit handlers"
23
- msgstr ":mod:`atexit` --- 종료 처리기"
21
+ msgstr ":mod:`! atexit` --- 종료 처리기"
24
22
25
23
#: ../../library/atexit.rst:12
26
24
msgid ""
@@ -79,15 +77,14 @@ msgstr ""
79
77
" 한다는 가정입니다."
80
78
81
79
#: ../../library/atexit.rst:43
82
- #, fuzzy
83
80
msgid ""
84
81
"If an exception is raised during execution of the exit handlers, a "
85
82
"traceback is printed (unless :exc:`SystemExit` is raised) and the "
86
83
"exception information is saved. After all exit handlers have had a "
87
84
"chance to run, the last exception to be raised is re-raised."
88
85
msgstr ""
89
86
"종료 처리기의 실행 중에 예외가 발생하면 (:exc:`SystemExit`\\ 가 발생하지 않는다면) 트레이스백이 인쇄되고 예외 "
90
- "정보가 저장됩니다. 모든 종료 처리기가 실행될 기회를 얻은 후에 발생한 마지막 예외를 다시 일으킵니다."
87
+ "정보가 저장됩니다. 모든 종료 처리기가 실행될 기회를 얻은 후에, 발생한 마지막 예외를 다시 일으킵니다."
91
88
92
89
#: ../../library/atexit.rst:48
93
90
msgid ""
@@ -120,6 +117,10 @@ msgid ""
120
117
"unregistration, so function references do not need to have matching "
121
118
"identities."
122
119
msgstr ""
120
+ "인터프리터 종료 시 실행할 함수 목록에서 *func* 를 제거합니다. :func:`unregister` 는 *func* 가 이전에 "
121
+ "등록되지 않았다면 아무것도 하지 않습니다. *func*\\ 가 두 번 이상 등록되었으면, :mod:`atexit` 호출 스택에서 해당"
122
+ " 함수를 모두 제거합니다. 등록을 해제하는 동안 내부적으로 동등 비교(``==``)가 사용되므로, 함수 참조는 대응하는 아이덴티티가"
123
+ " 필요 없습니다."
123
124
124
125
#: ../../library/atexit.rst:74
125
126
msgid "Module :mod:`readline`"
@@ -166,6 +167,23 @@ msgid ""
166
167
"\n"
167
168
"atexit.register(savecounter)"
168
169
msgstr ""
170
+ "try:\n"
171
+ " with open('counterfile') as infile:\n"
172
+ " _count = int(infile.read())\n"
173
+ "except FileNotFoundError:\n"
174
+ " _count = 0\n"
175
+ "\n"
176
+ "def incrcounter(n):\n"
177
+ " global _count\n"
178
+ " _count = _count + n\n"
179
+ "\n"
180
+ "def savecounter():\n"
181
+ " with open('counterfile', 'w') as outfile:\n"
182
+ " outfile.write('%d' % _count)\n"
183
+ "\n"
184
+ "import atexit\n"
185
+ "\n"
186
+ "atexit.register(savecounter)"
169
187
170
188
#: ../../library/atexit.rst:107
171
189
msgid ""
@@ -185,6 +203,14 @@ msgid ""
185
203
"# or:\n"
186
204
"atexit.register(goodbye, adjective='nice', name='Donny')"
187
205
msgstr ""
206
+ "def goodbye(name, adjective):\n"
207
+ " print('Goodbye %s, it was %s to meet you.' % (name, adjective))\n"
208
+ "\n"
209
+ "import atexit\n"
210
+ "\n"
211
+ "atexit.register(goodbye, 'Donny', 'nice')\n"
212
+ "# or:\n"
213
+ "atexit.register(goodbye, adjective='nice', name='Donny')"
188
214
189
215
#: ../../library/atexit.rst:119
190
216
msgid "Usage as a :term:`decorator`::"
@@ -198,26 +224,13 @@ msgid ""
198
224
"def goodbye():\n"
199
225
" print('You are now leaving the Python sector.')"
200
226
msgstr ""
227
+ "import atexit\n"
228
+ "\n"
229
+ "@atexit.register\n"
230
+ "def goodbye():\n"
231
+ " print('You are now leaving the Python sector.')"
201
232
202
233
#: ../../library/atexit.rst:127
203
234
msgid "This only works with functions that can be called without arguments."
204
235
msgstr "이 방법은 인자 없이 호출할 수 있는 함수에서만 작동합니다."
205
236
206
- #~ msgid ""
207
- #~ "Remove *func* from the list of "
208
- #~ "functions to be run at interpreter "
209
- #~ "shutdown. After calling :func:`unregister`, "
210
- #~ "*func* is guaranteed not to be "
211
- #~ "called when the interpreter shuts down,"
212
- #~ " even if it was registered more "
213
- #~ "than once. :func:`unregister` silently does"
214
- #~ " nothing if *func* was not previously"
215
- #~ " registered."
216
- #~ msgstr ""
217
- #~ "인터프리터 종료 시 실행할 함수 목록에서 *func* "
218
- #~ "를 제거합니다. :func:`unregister`\\를 호출한 후에는, "
219
- #~ "인터프리터가 종료할 때 *func* 이 호출되지 않음이 "
220
- #~ "보장됩니다. 두 번 이상 등록했더라도 그렇습니다. "
221
- #~ ":func:`unregister` 는 *func* 가 이전에 등록되지"
222
- #~ " 않았다면 아무것도 하지 않습니다."
223
-
0 commit comments