home *** CD-ROM | disk | FTP | other *** search
open in:
MacOS 8.1
|
Win98
|
DOS
view JSON data
|
view as text
This file was processed as: LaTeX Document
(document/latex).
You can browse this item here: ref4.tex
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| LaTeX Document (document/latex)
| magic
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| LaTeX document text
| default
| |
99%
| file
| LaTeX document, ASCII text, with CR line terminators
| default
| |
100%
| checkBytes
| Printable ASCII
| default
| |
100%
| perlTextCheck
| Likely Text (Perl)
| default
| |
100%
| siegfried
| fmt/281 LaTeX (Subdocument)
| default
| |
100%
| detectItEasy
| Format: plain text[CR]
| default (weak)
|
|
id metadata |
---|
key | value |
---|
macFileType | [TEXT] |
macFileCreator | [R*ch] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 5c 63 68 61 70 74 65 72 | 7b 45 78 65 63 75 74 69 |\chapter|{Executi|
|00000010| 6f 6e 20 6d 6f 64 65 6c | 7d 0d 5c 69 6e 64 65 78 |on model|}.\index|
|00000020| 7b 65 78 65 63 75 74 69 | 6f 6e 20 6d 6f 64 65 6c |{executi|on model|
|00000030| 7d 0d 0d 5c 73 65 63 74 | 69 6f 6e 7b 43 6f 64 65 |}..\sect|ion{Code|
|00000040| 20 62 6c 6f 63 6b 73 2c | 20 65 78 65 63 75 74 69 | blocks,| executi|
|00000050| 6f 6e 20 66 72 61 6d 65 | 73 2c 20 61 6e 64 20 6e |on frame|s, and n|
|00000060| 61 6d 65 20 73 70 61 63 | 65 73 7d 20 5c 6c 61 62 |ame spac|es} \lab|
|00000070| 65 6c 7b 65 78 65 63 66 | 72 61 6d 65 73 7d 0d 5c |el{execf|rames}.\|
|00000080| 69 6e 64 65 78 7b 63 6f | 64 65 20 62 6c 6f 63 6b |index{co|de block|
|00000090| 7d 0d 5c 69 6e 64 65 78 | 69 69 7b 65 78 65 63 75 |}.\index|ii{execu|
|000000a0| 74 69 6f 6e 7d 7b 66 72 | 61 6d 65 7d 0d 5c 69 6e |tion}{fr|ame}.\in|
|000000b0| 64 65 78 7b 6e 61 6d 65 | 20 73 70 61 63 65 7d 0d |dex{name| space}.|
|000000c0| 0d 41 20 7b 5c 65 6d 20 | 63 6f 64 65 20 62 6c 6f |.A {\em |code blo|
|000000d0| 63 6b 7d 20 69 73 20 61 | 20 70 69 65 63 65 20 6f |ck} is a| piece o|
|000000e0| 66 20 50 79 74 68 6f 6e | 20 70 72 6f 67 72 61 6d |f Python| program|
|000000f0| 20 74 65 78 74 20 74 68 | 61 74 20 63 61 6e 20 62 | text th|at can b|
|00000100| 65 0d 65 78 65 63 75 74 | 65 64 20 61 73 20 61 20 |e.execut|ed as a |
|00000110| 75 6e 69 74 2c 20 73 75 | 63 68 20 61 73 20 61 20 |unit, su|ch as a |
|00000120| 6d 6f 64 75 6c 65 2c 20 | 61 20 63 6c 61 73 73 20 |module, |a class |
|00000130| 64 65 66 69 6e 69 74 69 | 6f 6e 20 6f 72 20 61 20 |definiti|on or a |
|00000140| 66 75 6e 63 74 69 6f 6e | 0d 62 6f 64 79 2e 20 20 |function|.body. |
|00000150| 53 6f 6d 65 20 63 6f 64 | 65 20 62 6c 6f 63 6b 73 |Some cod|e blocks|
|00000160| 20 28 6c 69 6b 65 20 6d | 6f 64 75 6c 65 73 29 20 | (like m|odules) |
|00000170| 61 72 65 20 65 78 65 63 | 75 74 65 64 20 6f 6e 6c |are exec|uted onl|
|00000180| 79 20 6f 6e 63 65 2c 20 | 6f 74 68 65 72 73 0d 28 |y once, |others.(|
|00000190| 6c 69 6b 65 20 66 75 6e | 63 74 69 6f 6e 20 62 6f |like fun|ction bo|
|000001a0| 64 69 65 73 29 20 6d 61 | 79 20 62 65 20 65 78 65 |dies) ma|y be exe|
|000001b0| 63 75 74 65 64 20 6d 61 | 6e 79 20 74 69 6d 65 73 |cuted ma|ny times|
|000001c0| 2e 20 20 43 6f 64 65 20 | 62 6c 6f 63 6b 73 20 6d |. Code |blocks m|
|000001d0| 61 79 0d 74 65 78 74 75 | 61 6c 6c 79 20 63 6f 6e |ay.textu|ally con|
|000001e0| 74 61 69 6e 20 6f 74 68 | 65 72 20 63 6f 64 65 20 |tain oth|er code |
|000001f0| 62 6c 6f 63 6b 73 2e 20 | 20 43 6f 64 65 20 62 6c |blocks. | Code bl|
|00000200| 6f 63 6b 73 20 6d 61 79 | 20 69 6e 76 6f 6b 65 20 |ocks may| invoke |
|00000210| 6f 74 68 65 72 0d 63 6f | 64 65 20 62 6c 6f 63 6b |other.co|de block|
|00000220| 73 20 28 74 68 61 74 20 | 6d 61 79 20 6f 72 20 6d |s (that |may or m|
|00000230| 61 79 20 6e 6f 74 20 62 | 65 20 74 65 78 74 75 61 |ay not b|e textua|
|00000240| 6c 6c 79 20 63 6f 6e 74 | 61 69 6e 65 64 20 69 6e |lly cont|ained in|
|00000250| 20 74 68 65 6d 29 20 61 | 73 0d 70 61 72 74 20 6f | them) a|s.part o|
|00000260| 66 20 74 68 65 69 72 20 | 65 78 65 63 75 74 69 6f |f their |executio|
|00000270| 6e 2c 20 65 2e 67 2e 20 | 62 79 20 69 6e 76 6f 6b |n, e.g. |by invok|
|00000280| 69 6e 67 20 28 63 61 6c | 6c 69 6e 67 29 20 61 20 |ing (cal|ling) a |
|00000290| 66 75 6e 63 74 69 6f 6e | 2e 0d 5c 69 6e 64 65 78 |function|..\index|
|000002a0| 7b 63 6f 64 65 20 62 6c | 6f 63 6b 7d 0d 5c 69 6e |{code bl|ock}.\in|
|000002b0| 64 65 78 69 69 7b 63 6f | 64 65 7d 7b 62 6c 6f 63 |dexii{co|de}{bloc|
|000002c0| 6b 7d 0d 0d 54 68 65 20 | 66 6f 6c 6c 6f 77 69 6e |k}..The |followin|
|000002d0| 67 20 61 72 65 20 63 6f | 64 65 20 62 6c 6f 63 6b |g are co|de block|
|000002e0| 73 3a 20 20 41 20 6d 6f | 64 75 6c 65 20 69 73 20 |s: A mo|dule is |
|000002f0| 61 20 63 6f 64 65 20 62 | 6c 6f 63 6b 2e 20 20 41 |a code b|lock. A|
|00000300| 20 66 75 6e 63 74 69 6f | 6e 0d 62 6f 64 79 20 69 | functio|n.body i|
|00000310| 73 20 61 20 63 6f 64 65 | 20 62 6c 6f 63 6b 2e 20 |s a code| block. |
|00000320| 20 41 20 63 6c 61 73 73 | 20 64 65 66 69 6e 69 74 | A class| definit|
|00000330| 69 6f 6e 20 69 73 20 61 | 20 63 6f 64 65 20 62 6c |ion is a| code bl|
|00000340| 6f 63 6b 2e 20 20 45 61 | 63 68 0d 63 6f 6d 6d 61 |ock. Ea|ch.comma|
|00000350| 6e 64 20 74 79 70 65 64 | 20 69 6e 74 65 72 61 63 |nd typed| interac|
|00000360| 74 69 76 65 6c 79 20 69 | 73 20 61 20 73 65 70 61 |tively i|s a sepa|
|00000370| 72 61 74 65 20 63 6f 64 | 65 20 62 6c 6f 63 6b 3b |rate cod|e block;|
|00000380| 20 61 20 73 63 72 69 70 | 74 20 66 69 6c 65 20 69 | a scrip|t file i|
|00000390| 73 0d 61 20 63 6f 64 65 | 20 62 6c 6f 63 6b 2e 20 |s.a code| block. |
|000003a0| 20 54 68 65 20 73 74 72 | 69 6e 67 20 61 72 67 75 | The str|ing argu|
|000003b0| 6d 65 6e 74 20 70 61 73 | 73 65 64 20 74 6f 20 74 |ment pas|sed to t|
|000003c0| 68 65 20 62 75 69 6c 74 | 2d 69 6e 20 66 75 6e 63 |he built|-in func|
|000003d0| 74 69 6f 6e 0d 5c 76 65 | 72 62 40 65 76 61 6c 40 |tion.\ve|rb@eval@|
|000003e0| 20 61 6e 64 20 74 6f 20 | 74 68 65 20 5c 76 65 72 | and to |the \ver|
|000003f0| 62 40 65 78 65 63 40 20 | 73 74 61 74 65 6d 65 6e |b@exec@ |statemen|
|00000400| 74 20 61 72 65 20 63 6f | 64 65 20 62 6c 6f 63 6b |t are co|de block|
|00000410| 73 2e 0d 41 6e 64 20 66 | 69 6e 61 6c 6c 79 2c 20 |s..And f|inally, |
|00000420| 74 68 65 0d 65 78 70 72 | 65 73 73 69 6f 6e 20 72 |the.expr|ession r|
|00000430| 65 61 64 20 61 6e 64 20 | 65 76 61 6c 75 61 74 65 |ead and |evaluate|
|00000440| 64 20 62 79 20 74 68 65 | 20 62 75 69 6c 74 2d 69 |d by the| built-i|
|00000450| 6e 20 66 75 6e 63 74 69 | 6f 6e 20 5c 76 65 72 62 |n functi|on \verb|
|00000460| 40 69 6e 70 75 74 40 20 | 69 73 0d 61 20 63 6f 64 |@input@ |is.a cod|
|00000470| 65 20 62 6c 6f 63 6b 2e | 0d 0d 41 20 63 6f 64 65 |e block.|..A code|
|00000480| 20 62 6c 6f 63 6b 20 69 | 73 20 65 78 65 63 75 74 | block i|s execut|
|00000490| 65 64 20 69 6e 20 61 6e | 20 65 78 65 63 75 74 69 |ed in an| executi|
|000004a0| 6f 6e 20 66 72 61 6d 65 | 2e 20 20 41 6e 20 7b 5c |on frame|. An {\|
|000004b0| 65 6d 20 65 78 65 63 75 | 74 69 6f 6e 0d 66 72 61 |em execu|tion.fra|
|000004c0| 6d 65 7d 20 63 6f 6e 74 | 61 69 6e 73 20 73 6f 6d |me} cont|ains som|
|000004d0| 65 20 61 64 6d 69 6e 69 | 73 74 72 61 74 69 76 65 |e admini|strative|
|000004e0| 20 69 6e 66 6f 72 6d 61 | 74 69 6f 6e 20 28 75 73 | informa|tion (us|
|000004f0| 65 64 20 66 6f 72 20 64 | 65 62 75 67 67 69 6e 67 |ed for d|ebugging|
|00000500| 29 2c 0d 64 65 74 65 72 | 6d 69 6e 65 73 20 77 68 |),.deter|mines wh|
|00000510| 65 72 65 20 61 6e 64 20 | 68 6f 77 20 65 78 65 63 |ere and |how exec|
|00000520| 75 74 69 6f 6e 20 63 6f | 6e 74 69 6e 75 65 73 20 |ution co|ntinues |
|00000530| 61 66 74 65 72 20 74 68 | 65 20 63 6f 64 65 20 62 |after th|e code b|
|00000540| 6c 6f 63 6b 27 73 0d 65 | 78 65 63 75 74 69 6f 6e |lock's.e|xecution|
|00000550| 20 68 61 73 20 63 6f 6d | 70 6c 65 74 65 64 2c 20 | has com|pleted, |
|00000560| 61 6e 64 20 28 70 65 72 | 68 61 70 73 20 6d 6f 73 |and (per|haps mos|
|00000570| 74 20 69 6d 70 6f 72 74 | 61 6e 74 6c 79 29 20 64 |t import|antly) d|
|00000580| 65 66 69 6e 65 73 20 74 | 77 6f 0d 6e 61 6d 65 20 |efines t|wo.name |
|00000590| 73 70 61 63 65 73 2c 20 | 74 68 65 20 6c 6f 63 61 |spaces, |the loca|
|000005a0| 6c 20 61 6e 64 20 74 68 | 65 20 67 6c 6f 62 61 6c |l and th|e global|
|000005b0| 20 6e 61 6d 65 20 73 70 | 61 63 65 2c 20 74 68 61 | name sp|ace, tha|
|000005c0| 74 20 61 66 66 65 63 74 | 0d 65 78 65 63 75 74 69 |t affect|.executi|
|000005d0| 6f 6e 20 6f 66 20 74 68 | 65 20 63 6f 64 65 20 62 |on of th|e code b|
|000005e0| 6c 6f 63 6b 2e 0d 5c 69 | 6e 64 65 78 69 69 7b 65 |lock..\i|ndexii{e|
|000005f0| 78 65 63 75 74 69 6f 6e | 7d 7b 66 72 61 6d 65 7d |xecution|}{frame}|
|00000600| 0d 0d 41 20 7b 5c 65 6d | 20 6e 61 6d 65 20 73 70 |..A {\em| name sp|
|00000610| 61 63 65 7d 20 69 73 20 | 61 20 6d 61 70 70 69 6e |ace} is |a mappin|
|00000620| 67 20 66 72 6f 6d 20 6e | 61 6d 65 73 20 28 69 64 |g from n|ames (id|
|00000630| 65 6e 74 69 66 69 65 72 | 73 29 20 74 6f 20 6f 62 |entifier|s) to ob|
|00000640| 6a 65 63 74 73 2e 0d 41 | 20 70 61 72 74 69 63 75 |jects..A| particu|
|00000650| 6c 61 72 20 6e 61 6d 65 | 20 73 70 61 63 65 20 6d |lar name| space m|
|00000660| 61 79 20 62 65 20 72 65 | 66 65 72 65 6e 63 65 64 |ay be re|ferenced|
|00000670| 20 62 79 20 6d 6f 72 65 | 20 74 68 61 6e 20 6f 6e | by more| than on|
|00000680| 65 20 65 78 65 63 75 74 | 69 6f 6e 0d 66 72 61 6d |e execut|ion.fram|
|00000690| 65 2c 20 61 6e 64 20 66 | 72 6f 6d 20 6f 74 68 65 |e, and f|rom othe|
|000006a0| 72 20 70 6c 61 63 65 73 | 20 61 73 20 77 65 6c 6c |r places| as well|
|000006b0| 2e 20 20 41 64 64 69 6e | 67 20 61 20 6e 61 6d 65 |. Addin|g a name|
|000006c0| 20 74 6f 20 61 20 6e 61 | 6d 65 20 73 70 61 63 65 | to a na|me space|
|000006d0| 0d 69 73 20 63 61 6c 6c | 65 64 20 7b 5c 65 6d 20 |.is call|ed {\em |
|000006e0| 62 69 6e 64 69 6e 67 7d | 20 61 20 6e 61 6d 65 20 |binding}| a name |
|000006f0| 28 74 6f 20 61 6e 20 6f | 62 6a 65 63 74 29 3b 20 |(to an o|bject); |
|00000700| 63 68 61 6e 67 69 6e 67 | 20 74 68 65 20 6d 61 70 |changing| the map|
|00000710| 70 69 6e 67 20 6f 66 0d | 61 20 6e 61 6d 65 20 69 |ping of.|a name i|
|00000720| 73 20 63 61 6c 6c 65 64 | 20 7b 5c 65 6d 20 72 65 |s called| {\em re|
|00000730| 62 69 6e 64 69 6e 67 7d | 3b 20 72 65 6d 6f 76 69 |binding}|; removi|
|00000740| 6e 67 20 61 20 6e 61 6d | 65 20 69 73 20 7b 5c 65 |ng a nam|e is {\e|
|00000750| 6d 20 75 6e 62 69 6e 64 | 69 6e 67 7d 2e 0d 4e 61 |m unbind|ing}..Na|
|00000760| 6d 65 20 73 70 61 63 65 | 73 20 61 72 65 20 66 75 |me space|s are fu|
|00000770| 6e 63 74 69 6f 6e 61 6c | 6c 79 20 65 71 75 69 76 |nctional|ly equiv|
|00000780| 61 6c 65 6e 74 20 74 6f | 20 64 69 63 74 69 6f 6e |alent to| diction|
|00000790| 61 72 69 65 73 2e 0d 5c | 69 6e 64 65 78 7b 6e 61 |aries..\|index{na|
|000007a0| 6d 65 20 73 70 61 63 65 | 7d 0d 5c 69 6e 64 65 78 |me space|}.\index|
|000007b0| 69 69 7b 62 69 6e 64 69 | 6e 67 7d 7b 6e 61 6d 65 |ii{bindi|ng}{name|
|000007c0| 7d 0d 5c 69 6e 64 65 78 | 69 69 7b 72 65 62 69 6e |}.\index|ii{rebin|
|000007d0| 64 69 6e 67 7d 7b 6e 61 | 6d 65 7d 0d 5c 69 6e 64 |ding}{na|me}.\ind|
|000007e0| 65 78 69 69 7b 75 6e 62 | 69 6e 64 69 6e 67 7d 7b |exii{unb|inding}{|
|000007f0| 6e 61 6d 65 7d 0d 0d 54 | 68 65 20 7b 5c 65 6d 20 |name}..T|he {\em |
|00000800| 6c 6f 63 61 6c 20 6e 61 | 6d 65 20 73 70 61 63 65 |local na|me space|
|00000810| 7d 20 6f 66 20 61 6e 20 | 65 78 65 63 75 74 69 6f |} of an |executio|
|00000820| 6e 20 66 72 61 6d 65 20 | 64 65 74 65 72 6d 69 6e |n frame |determin|
|00000830| 65 73 20 74 68 65 20 64 | 65 66 61 75 6c 74 0d 70 |es the d|efault.p|
|00000840| 6c 61 63 65 20 77 68 65 | 72 65 20 6e 61 6d 65 73 |lace whe|re names|
|00000850| 20 61 72 65 20 64 65 66 | 69 6e 65 64 20 61 6e 64 | are def|ined and|
|00000860| 20 73 65 61 72 63 68 65 | 64 2e 20 20 54 68 65 20 | searche|d. The |
|00000870| 7b 5c 65 6d 20 67 6c 6f | 62 61 6c 20 6e 61 6d 65 |{\em glo|bal name|
|00000880| 0d 73 70 61 63 65 7d 20 | 64 65 74 65 72 6d 69 6e |.space} |determin|
|00000890| 65 73 20 74 68 65 20 70 | 6c 61 63 65 20 77 68 65 |es the p|lace whe|
|000008a0| 72 65 20 6e 61 6d 65 73 | 20 6c 69 73 74 65 64 20 |re names| listed |
|000008b0| 69 6e 20 5c 76 65 72 62 | 40 67 6c 6f 62 61 6c 40 |in \verb|@global@|
|000008c0| 0d 73 74 61 74 65 6d 65 | 6e 74 73 20 61 72 65 20 |.stateme|nts are |
|000008d0| 64 65 66 69 6e 65 64 20 | 61 6e 64 20 73 65 61 72 |defined |and sear|
|000008e0| 63 68 65 64 2c 20 61 6e | 64 20 77 68 65 72 65 20 |ched, an|d where |
|000008f0| 6e 61 6d 65 73 20 74 68 | 61 74 20 61 72 65 20 6e |names th|at are n|
|00000900| 6f 74 0d 65 78 70 6c 69 | 63 69 74 6c 79 20 62 6f |ot.expli|citly bo|
|00000910| 75 6e 64 20 69 6e 20 74 | 68 65 20 63 75 72 72 65 |und in t|he curre|
|00000920| 6e 74 20 63 6f 64 65 20 | 62 6c 6f 63 6b 20 61 72 |nt code |block ar|
|00000930| 65 20 73 65 61 72 63 68 | 65 64 2e 0d 5c 69 6e 64 |e search|ed..\ind|
|00000940| 65 78 69 69 7b 6c 6f 63 | 61 6c 7d 7b 6e 61 6d 65 |exii{loc|al}{name|
|00000950| 20 73 70 61 63 65 7d 0d | 5c 69 6e 64 65 78 69 69 | space}.|\indexii|
|00000960| 7b 67 6c 6f 62 61 6c 7d | 7b 6e 61 6d 65 20 73 70 |{global}|{name sp|
|00000970| 61 63 65 7d 0d 5c 73 74 | 69 6e 64 65 78 7b 67 6c |ace}.\st|index{gl|
|00000980| 6f 62 61 6c 7d 0d 0d 57 | 68 65 74 68 65 72 20 61 |obal}..W|hether a|
|00000990| 20 6e 61 6d 65 20 69 73 | 20 6c 6f 63 61 6c 20 6f | name is| local o|
|000009a0| 72 20 67 6c 6f 62 61 6c | 20 69 6e 20 61 20 63 6f |r global| in a co|
|000009b0| 64 65 20 62 6c 6f 63 6b | 20 69 73 20 64 65 74 65 |de block| is dete|
|000009c0| 72 6d 69 6e 65 64 20 62 | 79 0d 73 74 61 74 69 63 |rmined b|y.static|
|000009d0| 20 69 6e 73 70 65 63 74 | 69 6f 6e 20 6f 66 20 74 | inspect|ion of t|
|000009e0| 68 65 20 73 6f 75 72 63 | 65 20 74 65 78 74 20 66 |he sourc|e text f|
|000009f0| 6f 72 20 74 68 65 20 63 | 6f 64 65 20 62 6c 6f 63 |or the c|ode bloc|
|00000a00| 6b 3a 20 69 6e 20 74 68 | 65 0d 61 62 73 65 6e 63 |k: in th|e.absenc|
|00000a10| 65 20 6f 66 20 5c 76 65 | 72 62 40 67 6c 6f 62 61 |e of \ve|rb@globa|
|00000a20| 6c 40 20 73 74 61 74 65 | 6d 65 6e 74 73 2c 20 61 |l@ state|ments, a|
|00000a30| 20 6e 61 6d 65 20 74 68 | 61 74 20 69 73 20 62 6f | name th|at is bo|
|00000a40| 75 6e 64 20 61 6e 79 77 | 68 65 72 65 20 69 6e 0d |und anyw|here in.|
|00000a50| 74 68 65 20 63 6f 64 65 | 20 62 6c 6f 63 6b 20 69 |the code| block i|
|00000a60| 73 20 6c 6f 63 61 6c 20 | 69 6e 20 74 68 65 20 65 |s local |in the e|
|00000a70| 6e 74 69 72 65 20 63 6f | 64 65 20 62 6c 6f 63 6b |ntire co|de block|
|00000a80| 3b 20 61 6c 6c 20 6f 74 | 68 65 72 20 6e 61 6d 65 |; all ot|her name|
|00000a90| 73 20 61 72 65 0d 63 6f | 6e 73 69 64 65 72 65 64 |s are.co|nsidered|
|00000aa0| 20 67 6c 6f 62 61 6c 2e | 20 20 54 68 65 20 5c 76 | global.| The \v|
|00000ab0| 65 72 62 40 67 6c 6f 62 | 61 6c 40 20 73 74 61 74 |erb@glob|al@ stat|
|00000ac0| 65 6d 65 6e 74 20 66 6f | 72 63 65 73 20 67 6c 6f |ement fo|rces glo|
|00000ad0| 62 61 6c 0d 69 6e 74 65 | 72 70 72 65 74 61 74 69 |bal.inte|rpretati|
|00000ae0| 6f 6e 20 6f 66 20 73 65 | 6c 65 63 74 65 64 20 6e |on of se|lected n|
|00000af0| 61 6d 65 73 20 74 68 72 | 6f 75 67 68 6f 75 74 20 |ames thr|oughout |
|00000b00| 74 68 65 20 63 6f 64 65 | 20 62 6c 6f 63 6b 2e 20 |the code| block. |
|00000b10| 20 54 68 65 0d 66 6f 6c | 6c 6f 77 69 6e 67 20 63 | The.fol|lowing c|
|00000b20| 6f 6e 73 74 72 75 63 74 | 73 20 62 69 6e 64 20 6e |onstruct|s bind n|
|00000b30| 61 6d 65 73 3a 20 66 6f | 72 6d 61 6c 20 70 61 72 |ames: fo|rmal par|
|00000b40| 61 6d 65 74 65 72 73 2c | 20 5c 76 65 72 62 40 69 |ameters,| \verb@i|
|00000b50| 6d 70 6f 72 74 40 0d 73 | 74 61 74 65 6d 65 6e 74 |mport@.s|tatement|
|00000b60| 73 2c 20 63 6c 61 73 73 | 20 61 6e 64 20 66 75 6e |s, class| and fun|
|00000b70| 63 74 69 6f 6e 20 64 65 | 66 69 6e 69 74 69 6f 6e |ction de|finition|
|00000b80| 73 20 28 74 68 65 73 65 | 20 62 69 6e 64 20 74 68 |s (these| bind th|
|00000b90| 65 20 63 6c 61 73 73 20 | 6f 72 0d 66 75 6e 63 74 |e class |or.funct|
|00000ba0| 69 6f 6e 20 6e 61 6d 65 | 29 2c 20 61 6e 64 20 74 |ion name|), and t|
|00000bb0| 61 72 67 65 74 73 20 74 | 68 61 74 20 61 72 65 20 |argets t|hat are |
|00000bc0| 69 64 65 6e 74 69 66 69 | 65 72 73 20 69 66 20 6f |identifi|ers if o|
|00000bd0| 63 63 75 72 72 69 6e 67 | 20 69 6e 20 61 6e 0d 61 |ccurring| in an.a|
|00000be0| 73 73 69 67 6e 6d 65 6e | 74 2c 20 5c 76 65 72 62 |ssignmen|t, \verb|
|00000bf0| 40 66 6f 72 40 20 6c 6f | 6f 70 20 68 65 61 64 65 |@for@ lo|op heade|
|00000c00| 72 2c 20 6f 72 20 5c 76 | 65 72 62 40 65 78 63 65 |r, or \v|erb@exce|
|00000c10| 70 74 40 20 63 6c 61 75 | 73 65 20 68 65 61 64 65 |pt@ clau|se heade|
|00000c20| 72 2e 0d 0d 41 20 74 61 | 72 67 65 74 20 6f 63 63 |r...A ta|rget occ|
|00000c30| 75 72 72 69 6e 67 20 69 | 6e 20 61 20 5c 76 65 72 |urring i|n a \ver|
|00000c40| 62 40 64 65 6c 40 20 73 | 74 61 74 65 6d 65 6e 74 |b@del@ s|tatement|
|00000c50| 20 69 73 20 61 6c 73 6f | 20 63 6f 6e 73 69 64 65 | is also| conside|
|00000c60| 72 65 64 20 62 6f 75 6e | 64 0d 66 6f 72 20 74 68 |red boun|d.for th|
|00000c70| 69 73 20 70 75 72 70 6f | 73 65 20 28 74 68 6f 75 |is purpo|se (thou|
|00000c80| 67 68 20 74 68 65 20 61 | 63 74 75 61 6c 20 73 65 |gh the a|ctual se|
|00000c90| 6d 61 6e 74 69 63 73 20 | 61 72 65 20 74 6f 20 60 |mantics |are to `|
|00000ca0| 60 75 6e 62 69 6e 64 27 | 27 20 74 68 65 0d 6e 61 |`unbind'|' the.na|
|00000cb0| 6d 65 29 2e 0d 0d 57 68 | 65 6e 20 61 20 67 6c 6f |me)...Wh|en a glo|
|00000cc0| 62 61 6c 20 6e 61 6d 65 | 20 69 73 20 6e 6f 74 20 |bal name| is not |
|00000cd0| 66 6f 75 6e 64 20 69 6e | 20 74 68 65 20 67 6c 6f |found in| the glo|
|00000ce0| 62 61 6c 20 6e 61 6d 65 | 20 73 70 61 63 65 2c 20 |bal name| space, |
|00000cf0| 69 74 20 69 73 0d 73 65 | 61 72 63 68 65 64 20 69 |it is.se|arched i|
|00000d00| 6e 20 74 68 65 20 6c 69 | 73 74 20 6f 66 20 60 60 |n the li|st of ``|
|00000d10| 62 75 69 6c 74 2d 69 6e | 27 27 20 6e 61 6d 65 73 |built-in|'' names|
|00000d20| 20 28 77 68 69 63 68 20 | 69 73 20 61 63 74 75 61 | (which |is actua|
|00000d30| 6c 6c 79 20 74 68 65 0d | 67 6c 6f 62 61 6c 20 6e |lly the.|global n|
|00000d40| 61 6d 65 20 73 70 61 63 | 65 20 6f 66 20 74 68 65 |ame spac|e of the|
|00000d50| 20 6d 6f 64 75 6c 65 20 | 5c 76 65 72 62 40 5f 5f | module |\verb@__|
|00000d60| 62 75 69 6c 74 69 6e 5f | 5f 40 29 2e 20 20 57 68 |builtin_|_@). Wh|
|00000d70| 65 6e 20 61 20 6e 61 6d | 65 20 69 73 20 6e 6f 74 |en a nam|e is not|
|00000d80| 0d 66 6f 75 6e 64 20 61 | 74 20 61 6c 6c 2c 20 74 |.found a|t all, t|
|00000d90| 68 65 20 5c 76 65 72 62 | 40 4e 61 6d 65 45 72 72 |he \verb|@NameErr|
|00000da0| 6f 72 40 20 65 78 63 65 | 70 74 69 6f 6e 20 69 73 |or@ exce|ption is|
|00000db0| 20 72 61 69 73 65 64 2e | 25 0d 5c 66 6f 6f 74 6e | raised.|%.\footn|
|00000dc0| 6f 74 65 7b 49 66 20 74 | 68 65 20 63 6f 64 65 20 |ote{If t|he code |
|00000dd0| 62 6c 6f 63 6b 20 63 6f | 6e 74 61 69 6e 73 20 5c |block co|ntains \|
|00000de0| 76 65 72 62 40 65 78 65 | 63 40 20 73 74 61 74 65 |verb@exe|c@ state|
|00000df0| 6d 65 6e 74 73 20 6f 72 | 20 74 68 65 0d 63 6f 6e |ments or| the.con|
|00000e00| 73 74 72 75 63 74 20 5c | 76 65 72 62 40 66 72 6f |struct \|verb@fro|
|00000e10| 6d 20 2e 2e 2e 20 69 6d | 70 6f 72 74 20 2a 40 2c |m ... im|port *@,|
|00000e20| 20 74 68 65 20 73 65 6d | 61 6e 74 69 63 73 20 6f | the sem|antics o|
|00000e30| 66 20 6e 61 6d 65 73 20 | 6e 6f 74 0d 65 78 70 6c |f names |not.expl|
|00000e40| 69 63 69 74 6c 79 20 6d | 65 6e 74 69 6f 6e 65 64 |icitly m|entioned|
|00000e50| 20 69 6e 20 61 20 5c 76 | 65 72 62 40 67 6c 6f 62 | in a \v|erb@glob|
|00000e60| 61 6c 40 20 73 74 61 74 | 65 6d 65 6e 74 20 63 68 |al@ stat|ement ch|
|00000e70| 61 6e 67 65 20 73 75 62 | 74 6c 79 3a 20 6e 61 6d |ange sub|tly: nam|
|00000e80| 65 0d 6c 6f 6f 6b 75 70 | 20 66 69 72 73 74 20 73 |e.lookup| first s|
|00000e90| 65 61 72 63 68 65 73 20 | 74 68 65 20 6c 6f 63 61 |earches |the loca|
|00000ea0| 6c 20 6e 61 6d 65 20 73 | 70 61 63 65 2c 20 74 68 |l name s|pace, th|
|00000eb0| 65 6e 20 74 68 65 20 67 | 6c 6f 62 61 6c 20 6f 6e |en the g|lobal on|
|00000ec0| 65 2c 20 74 68 65 6e 0d | 74 68 65 20 62 75 69 6c |e, then.|the buil|
|00000ed0| 74 2d 69 6e 20 6f 6e 65 | 2e 7d 0d 0d 54 68 65 20 |t-in one|.}..The |
|00000ee0| 66 6f 6c 6c 6f 77 69 6e | 67 20 74 61 62 6c 65 20 |followin|g table |
|00000ef0| 6c 69 73 74 73 20 74 68 | 65 20 6d 65 61 6e 69 6e |lists th|e meanin|
|00000f00| 67 20 6f 66 20 74 68 65 | 20 6c 6f 63 61 6c 20 61 |g of the| local a|
|00000f10| 6e 64 20 67 6c 6f 62 61 | 6c 20 6e 61 6d 65 0d 73 |nd globa|l name.s|
|00000f20| 70 61 63 65 20 66 6f 72 | 20 76 61 72 69 6f 75 73 |pace for| various|
|00000f30| 20 74 79 70 65 73 20 6f | 66 20 63 6f 64 65 20 62 | types o|f code b|
|00000f40| 6c 6f 63 6b 73 2e 20 20 | 54 68 65 20 6e 61 6d 65 |locks. |The name|
|00000f50| 20 73 70 61 63 65 20 66 | 6f 72 20 61 0d 70 61 72 | space f|or a.par|
|00000f60| 74 69 63 75 6c 61 72 20 | 6d 6f 64 75 6c 65 20 69 |ticular |module i|
|00000f70| 73 20 61 75 74 6f 6d 61 | 74 69 63 61 6c 6c 79 20 |s automa|tically |
|00000f80| 63 72 65 61 74 65 64 20 | 77 68 65 6e 20 74 68 65 |created |when the|
|00000f90| 20 6d 6f 64 75 6c 65 20 | 69 73 20 66 69 72 73 74 | module |is first|
|00000fa0| 0d 72 65 66 65 72 65 6e | 63 65 64 2e 20 20 4e 6f |.referen|ced. No|
|00000fb0| 74 65 20 74 68 61 74 20 | 69 6e 20 61 6c 6d 6f 73 |te that |in almos|
|00000fc0| 74 20 61 6c 6c 20 63 61 | 73 65 73 2c 20 74 68 65 |t all ca|ses, the|
|00000fd0| 20 67 6c 6f 62 61 6c 20 | 6e 61 6d 65 20 73 70 61 | global |name spa|
|00000fe0| 63 65 20 69 73 0d 74 68 | 65 20 6e 61 6d 65 20 73 |ce is.th|e name s|
|00000ff0| 70 61 63 65 20 6f 66 20 | 74 68 65 20 63 6f 6e 74 |pace of |the cont|
|00001000| 61 69 6e 69 6e 67 20 6d | 6f 64 75 6c 65 20 2d 2d |aining m|odule --|
|00001010| 20 73 63 6f 70 65 73 20 | 69 6e 20 50 79 74 68 6f | scopes |in Pytho|
|00001020| 6e 20 64 6f 20 6e 6f 74 | 0d 6e 65 73 74 21 0d 0d |n do not|.nest!..|
|00001030| 5c 62 65 67 69 6e 7b 63 | 65 6e 74 65 72 7d 0d 5c |\begin{c|enter}.\|
|00001040| 62 65 67 69 6e 7b 74 61 | 62 75 6c 61 72 7d 7b 7c |begin{ta|bular}{||
|00001050| 6c 7c 6c 7c 6c 7c 6c 7c | 7d 0d 5c 68 6c 69 6e 65 |l|l|l|l||}.\hline|
|00001060| 0d 43 6f 64 65 20 62 6c | 6f 63 6b 20 74 79 70 65 |.Code bl|ock type|
|00001070| 20 26 20 47 6c 6f 62 61 | 6c 20 6e 61 6d 65 20 73 | & Globa|l name s|
|00001080| 70 61 63 65 20 26 20 4c | 6f 63 61 6c 20 6e 61 6d |pace & L|ocal nam|
|00001090| 65 20 73 70 61 63 65 20 | 26 20 4e 6f 74 65 73 20 |e space |& Notes |
|000010a0| 5c 5c 0d 5c 68 6c 69 6e | 65 0d 4d 6f 64 75 6c 65 |\\.\hlin|e.Module|
|000010b0| 20 26 20 6e 2e 73 2e 20 | 66 6f 72 20 74 68 69 73 | & n.s. |for this|
|000010c0| 20 6d 6f 64 75 6c 65 20 | 26 20 73 61 6d 65 20 61 | module |& same a|
|000010d0| 73 20 67 6c 6f 62 61 6c | 20 26 20 5c 5c 0d 53 63 |s global| & \\.Sc|
|000010e0| 72 69 70 74 20 26 20 6e | 2e 73 2e 20 66 6f 72 20 |ript & n|.s. for |
|000010f0| 5c 76 65 72 62 40 5f 5f | 6d 61 69 6e 5f 5f 40 20 |\verb@__|main__@ |
|00001100| 26 20 73 61 6d 65 20 61 | 73 20 67 6c 6f 62 61 6c |& same a|s global|
|00001110| 20 26 20 5c 5c 0d 49 6e | 74 65 72 61 63 74 69 76 | & \\.In|teractiv|
|00001120| 65 20 63 6f 6d 6d 61 6e | 64 20 26 20 6e 2e 73 2e |e comman|d & n.s.|
|00001130| 20 66 6f 72 20 5c 76 65 | 72 62 40 5f 5f 6d 61 69 | for \ve|rb@__mai|
|00001140| 6e 5f 5f 40 20 26 20 73 | 61 6d 65 20 61 73 20 67 |n__@ & s|ame as g|
|00001150| 6c 6f 62 61 6c 20 26 20 | 5c 5c 0d 43 6c 61 73 73 |lobal & |\\.Class|
|00001160| 20 64 65 66 69 6e 69 74 | 69 6f 6e 20 26 20 67 6c | definit|ion & gl|
|00001170| 6f 62 61 6c 20 6e 2e 73 | 2e 20 6f 66 20 63 6f 6e |obal n.s|. of con|
|00001180| 74 61 69 6e 69 6e 67 20 | 62 6c 6f 63 6b 20 26 20 |taining |block & |
|00001190| 6e 65 77 20 6e 2e 73 2e | 20 26 20 5c 5c 0d 46 75 |new n.s.| & \\.Fu|
|000011a0| 6e 63 74 69 6f 6e 20 62 | 6f 64 79 20 26 20 67 6c |nction b|ody & gl|
|000011b0| 6f 62 61 6c 20 6e 2e 73 | 2e 20 6f 66 20 63 6f 6e |obal n.s|. of con|
|000011c0| 74 61 69 6e 69 6e 67 20 | 62 6c 6f 63 6b 20 26 20 |taining |block & |
|000011d0| 6e 65 77 20 6e 2e 73 2e | 20 26 20 5c 5c 0d 53 74 |new n.s.| & \\.St|
|000011e0| 72 69 6e 67 20 70 61 73 | 73 65 64 20 74 6f 20 5c |ring pas|sed to \|
|000011f0| 76 65 72 62 40 65 78 65 | 63 40 20 73 74 61 74 65 |verb@exe|c@ state|
|00001200| 6d 65 6e 74 0d 09 26 20 | 67 6c 6f 62 61 6c 20 6e |ment..& |global n|
|00001210| 2e 73 2e 20 6f 66 20 63 | 6f 62 74 61 69 6e 69 6e |.s. of c|obtainin|
|00001220| 67 20 62 6c 6f 63 6b 0d | 09 09 26 20 6c 6f 63 61 |g block.|..& loca|
|00001230| 6c 20 6e 2e 73 2e 20 6f | 66 20 63 6f 6e 74 61 69 |l n.s. o|f contai|
|00001240| 6e 69 6e 67 20 62 6c 6f | 63 6b 20 26 20 28 31 29 |ning blo|ck & (1)|
|00001250| 20 5c 5c 0d 53 74 72 69 | 6e 67 20 70 61 73 73 65 | \\.Stri|ng passe|
|00001260| 64 20 74 6f 20 5c 76 65 | 72 62 40 65 76 61 6c 28 |d to \ve|rb@eval(|
|00001270| 29 40 0d 09 26 20 67 6c | 6f 62 61 6c 20 6e 2e 73 |)@..& gl|obal n.s|
|00001280| 2e 20 6f 66 20 63 61 6c | 6c 65 72 20 26 20 6c 6f |. of cal|ler & lo|
|00001290| 63 61 6c 20 6e 2e 73 2e | 20 6f 66 20 63 61 6c 6c |cal n.s.| of call|
|000012a0| 65 72 20 26 20 28 31 29 | 20 5c 5c 0d 46 69 6c 65 |er & (1)| \\.File|
|000012b0| 20 72 65 61 64 20 62 79 | 20 5c 76 65 72 62 40 65 | read by| \verb@e|
|000012c0| 78 65 63 66 69 6c 65 28 | 29 40 0d 09 26 20 67 6c |xecfile(|)@..& gl|
|000012d0| 6f 62 61 6c 20 6e 2e 73 | 2e 20 6f 66 20 63 61 6c |obal n.s|. of cal|
|000012e0| 6c 65 72 20 26 20 6c 6f | 63 61 6c 20 6e 2e 73 2e |ler & lo|cal n.s.|
|000012f0| 20 6f 66 20 63 61 6c 6c | 65 72 20 26 20 28 31 29 | of call|er & (1)|
|00001300| 20 5c 5c 0d 45 78 70 72 | 65 73 73 69 6f 6e 20 72 | \\.Expr|ession r|
|00001310| 65 61 64 20 62 79 20 5c | 76 65 72 62 40 69 6e 70 |ead by \|verb@inp|
|00001320| 75 74 40 0d 09 26 20 67 | 6c 6f 62 61 6c 20 6e 2e |ut@..& g|lobal n.|
|00001330| 73 2e 20 6f 66 20 63 61 | 6c 6c 65 72 20 26 20 6c |s. of ca|ller & l|
|00001340| 6f 63 61 6c 20 6e 2e 73 | 2e 20 6f 66 20 63 61 6c |ocal n.s|. of cal|
|00001350| 6c 65 72 20 26 20 5c 5c | 0d 5c 68 6c 69 6e 65 0d |ler & \\|.\hline.|
|00001360| 5c 65 6e 64 7b 74 61 62 | 75 6c 61 72 7d 0d 5c 65 |\end{tab|ular}.\e|
|00001370| 6e 64 7b 63 65 6e 74 65 | 72 7d 0d 0d 4e 6f 74 65 |nd{cente|r}..Note|
|00001380| 73 3a 0d 0d 5c 62 65 67 | 69 6e 7b 64 65 73 63 72 |s:..\beg|in{descr|
|00001390| 69 70 74 69 6f 6e 7d 0d | 0d 5c 69 74 65 6d 5b 6e |iption}.|.\item[n|
|000013a0| 2e 73 2e 5d 20 6d 65 61 | 6e 73 20 7b 5c 65 6d 20 |.s.] mea|ns {\em |
|000013b0| 6e 61 6d 65 20 73 70 61 | 63 65 7d 0d 0d 5c 69 74 |name spa|ce}..\it|
|000013c0| 65 6d 5b 28 31 29 5d 20 | 54 68 65 20 67 6c 6f 62 |em[(1)] |The glob|
|000013d0| 61 6c 20 61 6e 64 20 6c | 6f 63 61 6c 20 6e 61 6d |al and l|ocal nam|
|000013e0| 65 20 73 70 61 63 65 20 | 66 6f 72 20 74 68 65 73 |e space |for thes|
|000013f0| 65 20 63 61 6e 20 62 65 | 0d 6f 76 65 72 72 69 64 |e can be|.overrid|
|00001400| 64 65 6e 20 77 69 74 68 | 20 6f 70 74 69 6f 6e 61 |den with| optiona|
|00001410| 6c 20 65 78 74 72 61 20 | 61 72 67 75 6d 65 6e 74 |l extra |argument|
|00001420| 73 2e 0d 0d 5c 65 6e 64 | 7b 64 65 73 63 72 69 70 |s...\end|{descrip|
|00001430| 74 69 6f 6e 7d 0d 0d 5c | 73 65 63 74 69 6f 6e 7b |tion}..\|section{|
|00001440| 45 78 63 65 70 74 69 6f | 6e 73 7d 0d 0d 45 78 63 |Exceptio|ns}..Exc|
|00001450| 65 70 74 69 6f 6e 73 20 | 61 72 65 20 61 20 6d 65 |eptions |are a me|
|00001460| 61 6e 73 20 6f 66 20 62 | 72 65 61 6b 69 6e 67 20 |ans of b|reaking |
|00001470| 6f 75 74 20 6f 66 20 74 | 68 65 20 6e 6f 72 6d 61 |out of t|he norma|
|00001480| 6c 20 66 6c 6f 77 20 6f | 66 20 63 6f 6e 74 72 6f |l flow o|f contro|
|00001490| 6c 0d 6f 66 20 61 20 63 | 6f 64 65 20 62 6c 6f 63 |l.of a c|ode bloc|
|000014a0| 6b 20 69 6e 20 6f 72 64 | 65 72 20 74 6f 20 68 61 |k in ord|er to ha|
|000014b0| 6e 64 6c 65 20 65 72 72 | 6f 72 73 20 6f 72 20 6f |ndle err|ors or o|
|000014c0| 74 68 65 72 20 65 78 63 | 65 70 74 69 6f 6e 61 6c |ther exc|eptional|
|000014d0| 0d 63 6f 6e 64 69 74 69 | 6f 6e 73 2e 20 20 41 6e |.conditi|ons. An|
|000014e0| 20 65 78 63 65 70 74 69 | 6f 6e 20 69 73 20 7b 5c | excepti|on is {\|
|000014f0| 65 6d 20 72 61 69 73 65 | 64 7d 20 61 74 20 74 68 |em raise|d} at th|
|00001500| 65 20 70 6f 69 6e 74 20 | 77 68 65 72 65 20 74 68 |e point |where th|
|00001510| 65 20 65 72 72 6f 72 0d | 69 73 20 64 65 74 65 63 |e error.|is detec|
|00001520| 74 65 64 3b 20 69 74 20 | 6d 61 79 20 62 65 20 7b |ted; it |may be {|
|00001530| 5c 65 6d 20 68 61 6e 64 | 6c 65 64 7d 20 62 79 20 |\em hand|led} by |
|00001540| 74 68 65 20 73 75 72 72 | 6f 75 6e 64 69 6e 67 20 |the surr|ounding |
|00001550| 63 6f 64 65 20 62 6c 6f | 63 6b 20 6f 72 0d 62 79 |code blo|ck or.by|
|00001560| 20 61 6e 79 20 63 6f 64 | 65 20 62 6c 6f 63 6b 20 | any cod|e block |
|00001570| 74 68 61 74 20 64 69 72 | 65 63 74 6c 79 20 6f 72 |that dir|ectly or|
|00001580| 20 69 6e 64 69 72 65 63 | 74 6c 79 20 69 6e 76 6f | indirec|tly invo|
|00001590| 6b 65 64 20 74 68 65 20 | 63 6f 64 65 20 62 6c 6f |ked the |code blo|
|000015a0| 63 6b 0d 77 68 65 72 65 | 20 74 68 65 20 65 72 72 |ck.where| the err|
|000015b0| 6f 72 20 6f 63 63 75 72 | 72 65 64 2e 0d 5c 69 6e |or occur|red..\in|
|000015c0| 64 65 78 7b 65 78 63 65 | 70 74 69 6f 6e 7d 0d 5c |dex{exce|ption}.\|
|000015d0| 69 6e 64 65 78 7b 72 61 | 69 73 65 20 61 6e 20 65 |index{ra|ise an e|
|000015e0| 78 63 65 70 74 69 6f 6e | 7d 0d 5c 69 6e 64 65 78 |xception|}.\index|
|000015f0| 7b 68 61 6e 64 6c 65 20 | 61 6e 20 65 78 63 65 70 |{handle |an excep|
|00001600| 74 69 6f 6e 7d 0d 5c 69 | 6e 64 65 78 7b 65 78 63 |tion}.\i|ndex{exc|
|00001610| 65 70 74 69 6f 6e 20 68 | 61 6e 64 6c 65 72 7d 0d |eption h|andler}.|
|00001620| 5c 69 6e 64 65 78 7b 65 | 72 72 6f 72 73 7d 0d 5c |\index{e|rrors}.\|
|00001630| 69 6e 64 65 78 7b 65 72 | 72 6f 72 20 68 61 6e 64 |index{er|ror hand|
|00001640| 6c 69 6e 67 7d 0d 0d 54 | 68 65 20 50 79 74 68 6f |ling}..T|he Pytho|
|00001650| 6e 20 69 6e 74 65 72 70 | 72 65 74 65 72 20 72 61 |n interp|reter ra|
|00001660| 69 73 65 73 20 61 6e 20 | 65 78 63 65 70 74 69 6f |ises an |exceptio|
|00001670| 6e 20 77 68 65 6e 20 69 | 74 20 64 65 74 65 63 74 |n when i|t detect|
|00001680| 73 20 61 6e 20 72 75 6e | 2d 74 69 6d 65 0d 65 72 |s an run|-time.er|
|00001690| 72 6f 72 20 28 73 75 63 | 68 20 61 73 20 64 69 76 |ror (suc|h as div|
|000016a0| 69 73 69 6f 6e 20 62 79 | 20 7a 65 72 6f 29 2e 20 |ision by| zero). |
|000016b0| 20 41 20 50 79 74 68 6f | 6e 20 70 72 6f 67 72 61 | A Pytho|n progra|
|000016c0| 6d 20 63 61 6e 20 61 6c | 73 6f 0d 65 78 70 6c 69 |m can al|so.expli|
|000016d0| 63 69 74 6c 79 20 72 61 | 69 73 65 20 61 6e 20 65 |citly ra|ise an e|
|000016e0| 78 63 65 70 74 69 6f 6e | 20 77 69 74 68 20 74 68 |xception| with th|
|000016f0| 65 20 5c 76 65 72 62 40 | 72 61 69 73 65 40 20 73 |e \verb@|raise@ s|
|00001700| 74 61 74 65 6d 65 6e 74 | 2e 0d 45 78 63 65 70 74 |tatement|..Except|
|00001710| 69 6f 6e 20 68 61 6e 64 | 6c 65 72 73 20 61 72 65 |ion hand|lers are|
|00001720| 20 73 70 65 63 69 66 69 | 65 64 20 77 69 74 68 20 | specifi|ed with |
|00001730| 74 68 65 20 5c 76 65 72 | 62 40 74 72 79 2e 2e 2e |the \ver|b@try...|
|00001740| 65 78 63 65 70 74 40 0d | 73 74 61 74 65 6d 65 6e |except@.|statemen|
|00001750| 74 2e 0d 0d 50 79 74 68 | 6f 6e 20 75 73 65 73 20 |t...Pyth|on uses |
|00001760| 74 68 65 20 60 60 74 65 | 72 6d 69 6e 61 74 69 6f |the ``te|rminatio|
|00001770| 6e 27 27 20 6d 6f 64 65 | 6c 20 6f 66 20 65 72 72 |n'' mode|l of err|
|00001780| 6f 72 20 68 61 6e 64 6c | 69 6e 67 3a 20 61 6e 20 |or handl|ing: an |
|00001790| 65 78 63 65 70 74 69 6f | 6e 0d 68 61 6e 64 6c 65 |exceptio|n.handle|
|000017a0| 72 20 63 61 6e 20 66 69 | 6e 64 20 6f 75 74 20 77 |r can fi|nd out w|
|000017b0| 68 61 74 20 68 61 70 70 | 65 6e 65 64 20 61 6e 64 |hat happ|ened and|
|000017c0| 20 63 6f 6e 74 69 6e 75 | 65 20 65 78 65 63 75 74 | continu|e execut|
|000017d0| 69 6f 6e 20 61 74 20 61 | 6e 20 6f 75 74 65 72 0d |ion at a|n outer.|
|000017e0| 6c 65 76 65 6c 2c 20 62 | 75 74 20 69 74 20 63 61 |level, b|ut it ca|
|000017f0| 6e 6e 6f 74 20 72 65 70 | 61 69 72 20 74 68 65 20 |nnot rep|air the |
|00001800| 63 61 75 73 65 20 6f 66 | 20 74 68 65 20 65 72 72 |cause of| the err|
|00001810| 6f 72 20 61 6e 64 20 72 | 65 74 72 79 20 74 68 65 |or and r|etry the|
|00001820| 0d 66 61 69 6c 69 6e 67 | 20 6f 70 65 72 61 74 69 |.failing| operati|
|00001830| 6f 6e 20 28 65 78 63 65 | 70 74 20 62 79 20 72 65 |on (exce|pt by re|
|00001840| 2d 65 6e 74 65 72 69 6e | 67 20 74 68 65 20 74 68 |-enterin|g the th|
|00001850| 65 20 6f 66 66 65 6e 64 | 69 6e 67 20 70 69 65 63 |e offend|ing piec|
|00001860| 65 20 6f 66 0d 63 6f 64 | 65 20 66 72 6f 6d 20 74 |e of.cod|e from t|
|00001870| 68 65 20 74 6f 70 29 2e | 0d 0d 57 68 65 6e 20 61 |he top).|..When a|
|00001880| 6e 20 65 78 63 65 70 74 | 69 6f 6e 20 69 73 20 6e |n except|ion is n|
|00001890| 6f 74 20 68 61 6e 64 6c | 65 64 20 61 74 20 61 6c |ot handl|ed at al|
|000018a0| 6c 2c 20 74 68 65 20 69 | 6e 74 65 72 70 72 65 74 |l, the i|nterpret|
|000018b0| 65 72 20 74 65 72 6d 69 | 6e 61 74 65 73 0d 65 78 |er termi|nates.ex|
|000018c0| 65 63 75 74 69 6f 6e 20 | 6f 66 20 74 68 65 20 70 |ecution |of the p|
|000018d0| 72 6f 67 72 61 6d 2c 20 | 6f 72 20 72 65 74 75 72 |rogram, |or retur|
|000018e0| 6e 73 20 74 6f 20 69 74 | 73 20 69 6e 74 65 72 61 |ns to it|s intera|
|000018f0| 63 74 69 76 65 20 6d 61 | 69 6e 20 6c 6f 6f 70 2e |ctive ma|in loop.|
|00001900| 0d 0d 45 78 63 65 70 74 | 69 6f 6e 73 20 61 72 65 |..Except|ions are|
|00001910| 20 69 64 65 6e 74 69 66 | 69 65 64 20 62 79 20 73 | identif|ied by s|
|00001920| 74 72 69 6e 67 20 6f 62 | 6a 65 63 74 73 2e 20 20 |tring ob|jects. |
|00001930| 54 77 6f 20 64 69 66 66 | 65 72 65 6e 74 20 73 74 |Two diff|erent st|
|00001940| 72 69 6e 67 0d 6f 62 6a | 65 63 74 73 20 77 69 74 |ring.obj|ects wit|
|00001950| 68 20 74 68 65 20 73 61 | 6d 65 20 76 61 6c 75 65 |h the sa|me value|
|00001960| 20 69 64 65 6e 74 69 66 | 79 20 64 69 66 66 65 72 | identif|y differ|
|00001970| 65 6e 74 20 65 78 63 65 | 70 74 69 6f 6e 73 2e 0d |ent exce|ptions..|
|00001980| 0d 57 68 65 6e 20 61 6e | 20 65 78 63 65 70 74 69 |.When an| excepti|
|00001990| 6f 6e 20 69 73 20 72 61 | 69 73 65 64 2c 20 61 6e |on is ra|ised, an|
|000019a0| 20 6f 62 6a 65 63 74 20 | 28 6d 61 79 62 65 20 5c | object |(maybe \|
|000019b0| 76 65 72 62 40 4e 6f 6e | 65 40 29 20 69 73 20 70 |verb@Non|e@) is p|
|000019c0| 61 73 73 65 64 0d 61 73 | 20 74 68 65 20 65 78 63 |assed.as| the exc|
|000019d0| 65 70 74 69 6f 6e 27 73 | 20 60 60 70 61 72 61 6d |eption's| ``param|
|000019e0| 65 74 65 72 27 27 3b 20 | 74 68 69 73 20 6f 62 6a |eter''; |this obj|
|000019f0| 65 63 74 20 64 6f 65 73 | 20 6e 6f 74 20 61 66 66 |ect does| not aff|
|00001a00| 65 63 74 20 74 68 65 0d | 73 65 6c 65 63 74 69 6f |ect the.|selectio|
|00001a10| 6e 20 6f 66 20 61 6e 20 | 65 78 63 65 70 74 69 6f |n of an |exceptio|
|00001a20| 6e 20 68 61 6e 64 6c 65 | 72 2c 20 62 75 74 20 69 |n handle|r, but i|
|00001a30| 73 20 70 61 73 73 65 64 | 20 74 6f 20 74 68 65 20 |s passed| to the |
|00001a40| 73 65 6c 65 63 74 65 64 | 0d 65 78 63 65 70 74 69 |selected|.excepti|
|00001a50| 6f 6e 20 68 61 6e 64 6c | 65 72 20 61 73 20 61 64 |on handl|er as ad|
|00001a60| 64 69 74 69 6f 6e 61 6c | 20 69 6e 66 6f 72 6d 61 |ditional| informa|
|00001a70| 74 69 6f 6e 2e 0d 0d 53 | 65 65 20 61 6c 73 6f 20 |tion...S|ee also |
|00001a80| 74 68 65 20 64 65 73 63 | 72 69 70 74 69 6f 6e 20 |the desc|ription |
|00001a90| 6f 66 20 74 68 65 20 5c | 76 65 72 62 40 74 72 79 |of the \|verb@try|
|00001aa0| 40 20 61 6e 64 20 5c 76 | 65 72 62 40 72 61 69 73 |@ and \v|erb@rais|
|00001ab0| 65 40 0d 73 74 61 74 65 | 6d 65 6e 74 73 2e 0d |e@.state|ments.. |
+--------+-------------------------+-------------------------+--------+--------+