@@ -147,7 +147,6 @@ msgstr ""
147
147
"수도 있습니다."
148
148
149
149
#: ../../reference/executionmodel.rst:89
150
- #, fuzzy
151
150
msgid ""
152
151
"If a name is bound in a block, it is a local variable of that block, "
153
152
"unless declared as :keyword:`nonlocal` or :keyword:`global`. If a name "
@@ -157,8 +156,8 @@ msgid ""
157
156
msgstr ""
158
157
"만약 이름이 블록 내에서 연결되면, :keyword:`nonlocal` 이나 :keyword:`global` 로 선언되지 않는 "
159
158
"이상, 그 블록의 지역 변수입니다. 만약 이름이 모듈 수준에서 연결되면, 전역 변수입니다. (모듈 코드 블록의 변수들 지역이면서 "
160
- "전역입니다.) 만약 변수가 코드 블록에서 사용되지만, 거기에서 정의되지 않았으면 :dfn :`자유 변수( freevariable)` "
161
- " 입니다."
159
+ "전역입니다.) 만약 변수가 코드 블록에서 사용되지만, 거기에서 정의되지 않았으면 :term :`자유 변수< free "
160
+ "variable>` 입니다."
162
161
163
162
#: ../../reference/executionmodel.rst:95
164
163
msgid ""
@@ -207,7 +206,6 @@ msgstr ""
207
206
":exc:`UnboundLocalError` 는 :exc:`NameError` 의 서브 클래스입니다."
208
207
209
208
#: ../../reference/executionmodel.rst:127
210
- #, fuzzy
211
209
msgid ""
212
210
"If a name binding operation occurs anywhere within a code block, all uses"
213
211
" of the name within the block are treated as references to the current "
@@ -221,10 +219,10 @@ msgstr ""
221
219
"만약 이름 연결 연산이 코드 블록 내의 어디에서 건 일어난다면, 그 블록 내에서 그 이름의 모든 사용은 현재 블록을 가리키는 것으로"
222
220
" 취급됩니다. 이것은 연결되기 전에 블록에서 사용될 때 에러로 이어질 수 있습니다. 이 규칙은 미묘합니다. 파이썬에는 "
223
221
"선언(declaration)이 없고, 이름 연결 연산이 코드 블록 내의 어디에서나 일어날 수 있도록 허락합니다. 코드 블록의 지역 "
224
- "변수는 블록의 텍스트 전체에서 이름 연결 연산을 찾아야 결정될 수 있습니다."
222
+ "변수는 블록의 텍스트 전체에서 이름 연결 연산을 찾아야 결정될 수 있습니다. 예제는 :ref:`UnboundLocalError 에 "
223
+ "관한 FAQ 항목 <faq-unboundlocalerror>`\\ 을 참조하세요."
225
224
226
225
#: ../../reference/executionmodel.rst:136
227
- #, fuzzy
228
226
msgid ""
229
227
"If the :keyword:`global` statement occurs within a block, all uses of the"
230
228
" names specified in the statement refer to the bindings of those names in"
@@ -240,8 +238,9 @@ msgstr ""
240
238
"만약 :keyword:`global` 문이 블록 내에서 나오면, 문장에서 지정한 이름의 모든 사용은 최상위 이름 공간(top-"
241
239
"level namespace)에 연결된 것을 가리키게 됩니다. 최상위 이름 공간에서 이름을 검색한다는 것은, 전역 이름 공간, 즉 "
242
240
"코드 블록을 포함하는 모듈의 이름 공간, 과 내장 이름 공간, 모듈 :mod:`builtins` 의 이름 공간, 을 검색한다는 "
243
- "뜻입니다. 전역 이름 공간이 먼저 검색됩니다. 거기에서 이름이 발견되지 않으면, 내장 이름 공간을 검색합니다. "
244
- ":keyword:`!global` 문은 그 이름을 사용하기 전에 나와야 합니다."
241
+ "뜻입니다. 전역 이름 공간이 먼저 검색됩니다. 거기에서 이름이 발견되지 않으면, 내장 이름 공간을 다음에 검색합니다. 내장 이름 "
242
+ "공간에서도 이름이 발견되지 않으면, 전역 이름 공간에 새 변수가 만들어집니다. global 문은 나열된 이름을 사용하기 전에 나와야"
243
+ " 합니다."
245
244
246
245
#: ../../reference/executionmodel.rst:146
247
246
msgid ""
@@ -254,7 +253,6 @@ msgstr ""
254
253
"둘러싸는 스코프가 global 문을 포함한다면, 그 자유 변수는 전역으로 취급됩니다."
255
254
256
255
#: ../../reference/executionmodel.rst:152
257
- #, fuzzy
258
256
msgid ""
259
257
"The :keyword:`nonlocal` statement causes corresponding names to refer to "
260
258
"previously bound variables in the nearest enclosing function scope. "
@@ -264,6 +262,7 @@ msgid ""
264
262
msgstr ""
265
263
":keyword:`nonlocal` 문은 대응하는 이름이 가장 가까이서 둘러싸는 함수 스코프에서 이미 연결된 이름을 가리키도록 "
266
264
"만듭니다. 만약 주어진 이름이 둘러싸는 함수 스코프 어디에도 없다면 컴파일 시점에 :exc:`SyntaxError` 를 일으킵니다."
265
+ " :ref:`형 매개 변수 <type-params>`\\ 는 :keyword:`!nonlocal` 문으로 재연결할 수 없습니다."
267
266
268
267
#: ../../reference/executionmodel.rst:160
269
268
msgid ""
@@ -275,7 +274,6 @@ msgstr ""
275
274
" 불립니다."
276
275
277
276
#: ../../reference/executionmodel.rst:163
278
- #, fuzzy
279
277
msgid ""
280
278
"Class definition blocks and arguments to :func:`exec` and :func:`eval` "
281
279
"are special in the context of name resolution. A class definition is an "
@@ -293,16 +291,19 @@ msgstr ""
293
291
"클래스 정의 블록과 :func:`exec` 와 :func:`eval` 로 전달되는 인자는 특별한 이름 검색 문맥을 갖습니다. 클래스"
294
292
" 정의는 이름을 사용하고 정의할 수 있는 실행 가능한 문장입니다. 이 참조들은 연결되지 않은 지역 변수를 전역 이름 공간에서 "
295
293
"찾는다는 점을 제외하고는 이름 검색의 일반적인 규칙을 따릅니다. 클래스 정의의 이름 공간은 클래스의 어트리뷰트 딕셔너리가 됩니다. "
296
- "클래스 블록에서 정의된 이름들의 스코프는 클래스 블록으로 제한됩니다; 메서드들의 코드 블록으로 확대되지 않습니다 -- 이것은 "
297
- "컴프리헨션과 제너레이터 표현을포함하는데 이것들이 함수 스코프를 사용해서 구현되기 때문입니다. 이것은 다음과 같은 것이 실패한다는 "
298
- "뜻입니다::"
294
+ "클래스 블록에서 정의된 이름들의 스코프는 클래스 블록으로 제한됩니다; 메서드들의 코드 블록으로 확대되지 않습니다. 이것은 "
295
+ "컴프리헨션과 제너레이터 표현을포함하지만, 둘러싸는 클래스 스코프에 액세스하는 :ref:`어노테이션 스코프 <annotation- "
296
+ "scopes>` \\ 는 포함하지 않습니다. 이것은 다음과 같은 것이 실패한다는 뜻입니다::"
299
297
300
298
#: ../../reference/executionmodel.rst:176
301
299
msgid ""
302
300
"class A:\n"
303
301
" a = 42\n"
304
302
" b = list(a + i for i in range(10))"
305
303
msgstr ""
304
+ "class A:\n"
305
+ " a = 42\n"
306
+ " b = list(a + i for i in range(10))"
306
307
307
308
#: ../../reference/executionmodel.rst:180
308
309
msgid "However, the following will succeed::"
@@ -316,6 +317,11 @@ msgid ""
316
317
"\n"
317
318
"print(A.Alias.__value__) # <type 'A.Nested'>"
318
319
msgstr ""
320
+ "class A:\n"
321
+ " type Alias = Nested\n"
322
+ " class Nested: pass\n"
323
+ "\n"
324
+ "print(A.Alias.__value__) # <type 'A.Nested'>"
319
325
320
326
#: ../../reference/executionmodel.rst:191
321
327
msgid "Annotation scopes"
@@ -446,6 +452,17 @@ msgid ""
446
452
" ...\n"
447
453
"ZeroDivisionError: division by zero"
448
454
msgstr ""
455
+ ">>> type Alias = 1/0\n"
456
+ ">>> Alias.__value__\n"
457
+ "Traceback (most recent call last):\n"
458
+ " ...\n"
459
+ "ZeroDivisionError: division by zero\n"
460
+ ">>> def func[T: 1/0](): pass\n"
461
+ ">>> T = func.__type_params__[0]\n"
462
+ ">>> T.__bound__\n"
463
+ "Traceback (most recent call last):\n"
464
+ " ...\n"
465
+ "ZeroDivisionError: division by zero"
449
466
450
467
#: ../../reference/executionmodel.rst:267
451
468
msgid ""
@@ -470,6 +487,11 @@ msgid ""
470
487
"type Parenthesized = tuple[Literal[\" (\" ], Expr, Literal[\" )\" ]]\n"
471
488
"type Expr = SimpleExpr | tuple[SimpleExpr, Literal[\" +\" ,\" -\" ], Expr]"
472
489
msgstr ""
490
+ "from typing import Literal\n"
491
+ "\n"
492
+ "type SimpleExpr = int | Parenthesized\n"
493
+ "type Parenthesized = tuple[Literal[\" (\" ], Expr, Literal[\" )\" ]]\n"
494
+ "type Expr = SimpleExpr | tuple[SimpleExpr, Literal[\" +\" ,\" -\" ], Expr]"
473
495
474
496
#: ../../reference/executionmodel.rst:281
475
497
msgid ""
@@ -529,6 +551,11 @@ msgid ""
529
551
"i = 42\n"
530
552
"f()"
531
553
msgstr ""
554
+ "i = 10\n"
555
+ "def f():\n"
556
+ " print(i)\n"
557
+ "i = 42\n"
558
+ "f()"
532
559
533
560
#: ../../reference/executionmodel.rst:326
534
561
msgid ""
@@ -599,7 +626,6 @@ msgstr ""
599
626
"예외가 :exc:`SystemExit` 인 경우를 제외하고, 스택 트레이스백을 인쇄합니다."
600
627
601
628
#: ../../reference/executionmodel.rst:378
602
- #, fuzzy
603
629
msgid ""
604
630
"Exceptions are identified by class instances. The :keyword:`except` "
605
631
"clause is selected depending on the class of the instance: it must "
@@ -609,8 +635,8 @@ msgid ""
609
635
"condition."
610
636
msgstr ""
611
637
"예외는 클래스 인스턴스로 구분됩니다. :keyword:`except` 절은 인스턴스의 클래스에 따라 선택됩니다: 인스턴스의 클래스나"
612
- " 그것의 베이스클래스를 가리켜야 합니다. 인스턴스는 핸들러가 수신할 수 있고 예외적인 조건에 대한 추가적인 정보를 포함할 수 "
613
- "있습니다."
638
+ " 그것의:term:`비가상(non-virtual) 베이스클래스 <abstract base class>` \\ 를 가리켜야 합니다. "
639
+ "인스턴스는 핸들러가 수신할 수 있고 예외적인 조건에 대한 추가적인 정보를 포함할 수 있습니다."
614
640
615
641
#: ../../reference/executionmodel.rst:386
616
642
msgid ""
@@ -641,120 +667,112 @@ msgid ""
641
667
msgstr "이 한계는 이 연산들 때문에 실행되는 코드가 모듈이 컴파일되는 시점에는 존재하지 않았기 때문입니다."
642
668
643
669
#: ../../reference/executionmodel.rst:8
644
- #, fuzzy
645
670
msgid "execution model"
646
671
msgstr "실행 모델"
647
672
648
673
#: ../../reference/executionmodel.rst:8
649
674
msgid "code"
650
- msgstr ""
675
+ msgstr "코드 "
651
676
652
677
#: ../../reference/executionmodel.rst:8 ../../reference/executionmodel.rst:17
653
678
msgid "block"
654
- msgstr ""
679
+ msgstr "블록 "
655
680
656
681
#: ../../reference/executionmodel.rst:31 ../../reference/executionmodel.rst:292
657
- #, fuzzy
658
682
msgid "execution"
659
- msgstr "실행 모델 "
683
+ msgstr "실행"
660
684
661
685
#: ../../reference/executionmodel.rst:31
662
686
msgid "frame"
663
- msgstr ""
687
+ msgstr "프레임 "
664
688
665
689
#: ../../reference/executionmodel.rst:42
666
690
msgid "namespace"
667
- msgstr ""
691
+ msgstr "이름 공간 "
668
692
669
693
#: ../../reference/executionmodel.rst:42 ../../reference/executionmodel.rst:103
670
694
msgid "scope"
671
- msgstr ""
695
+ msgstr "스코프 "
672
696
673
697
#: ../../reference/executionmodel.rst:51
674
698
msgid "name"
675
- msgstr ""
699
+ msgstr "이름 "
676
700
677
701
#: ../../reference/executionmodel.rst:51
678
- #, fuzzy
679
702
msgid "binding"
680
- msgstr "이름의 연결"
703
+ msgstr "연결"
681
704
682
705
#: ../../reference/executionmodel.rst:57
683
706
msgid "from"
684
- msgstr ""
707
+ msgstr "from "
685
708
686
709
#: ../../reference/executionmodel.rst:57
687
710
msgid "import statement"
688
- msgstr ""
711
+ msgstr "임포트 문 "
689
712
690
713
#: ../../reference/executionmodel.rst:87
691
714
msgid "free"
692
- msgstr ""
715
+ msgstr "자유 "
693
716
694
717
#: ../../reference/executionmodel.rst:87
695
718
msgid "variable"
696
- msgstr ""
719
+ msgstr "변수 "
697
720
698
721
#: ../../reference/executionmodel.rst:111
699
722
msgid "environment"
700
- msgstr ""
723
+ msgstr "환경 "
701
724
702
725
#: ../../reference/executionmodel.rst:117
703
726
msgid "NameError (built-in exception)"
704
- msgstr ""
727
+ msgstr "NameError (내장 예외) "
705
728
706
729
#: ../../reference/executionmodel.rst:117
707
730
msgid "UnboundLocalError"
708
- msgstr ""
731
+ msgstr "UnboundLocalError "
709
732
710
733
#: ../../reference/executionmodel.rst:158
711
734
msgid "module"
712
- msgstr ""
735
+ msgstr "모듈 "
713
736
714
737
#: ../../reference/executionmodel.rst:158
715
738
msgid "__main__"
716
- msgstr ""
739
+ msgstr "__main__ "
717
740
718
741
#: ../../reference/executionmodel.rst:292
719
742
msgid "restricted"
720
- msgstr ""
743
+ msgstr "제한된 "
721
744
722
745
#: ../../reference/executionmodel.rst:342
723
- #, fuzzy
724
746
msgid "exception"
725
747
msgstr "예외"
726
748
727
749
#: ../../reference/executionmodel.rst:344
728
- #, fuzzy
729
750
msgid "raise an exception"
730
- msgstr "예외 "
751
+ msgstr "예외를 발생시키다 "
731
752
732
753
#: ../../reference/executionmodel.rst:344
733
- #, fuzzy
734
754
msgid "handle an exception"
735
- msgstr "예외 "
755
+ msgstr "예외를 처리하다 "
736
756
737
757
#: ../../reference/executionmodel.rst:344
738
- #, fuzzy
739
758
msgid "exception handler"
740
- msgstr "예외"
759
+ msgstr "예외 처리기 "
741
760
742
761
#: ../../reference/executionmodel.rst:344
743
762
msgid "errors"
744
- msgstr ""
763
+ msgstr "에러 "
745
764
746
765
#: ../../reference/executionmodel.rst:344
747
766
msgid "error handling"
748
- msgstr ""
767
+ msgstr "에러 처리 "
749
768
750
769
#: ../../reference/executionmodel.rst:365
751
- #, fuzzy
752
770
msgid "termination model"
753
- msgstr "실행 모델"
771
+ msgstr "종료 모델"
754
772
755
773
#: ../../reference/executionmodel.rst:372
756
774
msgid "SystemExit (built-in exception)"
757
- msgstr ""
775
+ msgstr "SystemExit (내장 예외) "
758
776
759
777
#~ msgid ""
760
778
#~ "The following constructs bind names: "