commit 3eaaad709708fa249acc0ed73e3a27c120434263 Author: Kursmester <kurs@pvv.ntnu.no> Date: Wed Mar 5 11:25:40 2025 +0100 Recover from microbel diff --git a/README.md b/README.md new file mode 100644 index 0000000..129b1f7 --- /dev/null +++ b/README.md @@ -0,0 +1,25 @@ +## Python-kurs 25. oktober 1999 + +Denne kodebrønnen inneholder materiell (foiler og en quick reference) +som ble oppkopiert og utdelt ved Python-kurset som Steinar Knutsen +<sk@nvg.ntnu.no> holdt for PVV 1999-10-25. + +--- + +PVV holder kurs i Python. Python er et objekt-orientert +programmeringsspråk, som har fått god omtale for sitt enkle og forståelige +syntax. Det gjør at både nybegynner og garva programmerere kan lett lære +seg det. Selv med et enkelt språk kan det utføre nesten alt man kan utføre +med C og C++ programmerings språkene. Python kan tildels sammenlignes med +Tcl og Perl. + +## Tid og sted: + +Mandag 25. oktober, 17:00 -> Auditorium S5, Sentralbygg II, Gløshaugen + +Steinar Knutsen vil forelese. Kurset er gratis for PVV-medlemmer og +NVG-medlemmer, andre må betale 50 kr (bare 42 kr for PVV medlemskap). + +Påmelding: [kurs@pvv.ntnu.no](mailto://kurs@pvv.ntnu.no) + +Frist: 23.oktober. diff --git a/forside.ps b/forside.ps new file mode 100644 index 0000000..a19e730 --- /dev/null +++ b/forside.ps @@ -0,0 +1,371 @@ +%!PS-Adobe-2.0 +%%Creator: dvips(k) 5.83 Copyright 1998 Radical Eye Software +%%Title: forside.dvi +%%Pages: 1 +%%PageOrder: Ascend +%%BoundingBox: 0 0 596 842 +%%DocumentPaperSizes: a4 +%%EndComments +%DVIPSWebPage: (www.radicaleye.com) +%DVIPSCommandLine: dvips -t a4 -o forside.ps forside.dvi +%DVIPSParameters: dpi=600, compressed, comments removed +%DVIPSSource: TeX output 1999.10.23:2202 +%%BeginProcSet: texc.pro +/TeXDict 300 dict def TeXDict begin/N{def}def/B{bind def}N/S{exch}N/X{S +N}B/A{dup}B/TR{translate}N/isls false N/vsize 11 72 mul N/hsize 8.5 72 +mul N/landplus90{false}def/@rigin{isls{[0 landplus90{1 -1}{-1 1}ifelse 0 +0 0]concat}if 72 Resolution div 72 VResolution div neg scale isls{ +landplus90{VResolution 72 div vsize mul 0 exch}{Resolution -72 div hsize +mul 0}ifelse TR}if Resolution VResolution vsize -72 div 1 add mul TR[ +matrix currentmatrix{A A round sub abs 0.00001 lt{round}if}forall round +exch round exch]setmatrix}N/@landscape{/isls true N}B/@manualfeed{ +statusdict/manualfeed true put}B/@copies{/#copies X}B/FMat[1 0 0 -1 0 0] +N/FBB[0 0 0 0]N/nn 0 N/IE 0 N/ctr 0 N/df-tail{/nn 8 dict N nn begin +/FontType 3 N/FontMatrix fntrx N/FontBBox FBB N string/base X array +/BitMaps X/BuildChar{CharBuilder}N/Encoding IE N end A{/foo setfont}2 +array copy cvx N load 0 nn put/ctr 0 N[}B/sf 0 N/df{/sf 1 N/fntrx FMat N +df-tail}B/dfs{div/sf X/fntrx[sf 0 0 sf neg 0 0]N df-tail}B/E{pop nn A +definefont setfont}B/Cw{Cd A length 5 sub get}B/Ch{Cd A length 4 sub get +}B/Cx{128 Cd A length 3 sub get sub}B/Cy{Cd A length 2 sub get 127 sub} +B/Cdx{Cd A length 1 sub get}B/Ci{Cd A type/stringtype ne{ctr get/ctr ctr +1 add N}if}B/id 0 N/rw 0 N/rc 0 N/gp 0 N/cp 0 N/G 0 N/CharBuilder{save 3 +1 roll S A/base get 2 index get S/BitMaps get S get/Cd X pop/ctr 0 N Cdx +0 Cx Cy Ch sub Cx Cw add Cy setcachedevice Cw Ch true[1 0 0 -1 -.1 Cx +sub Cy .1 sub]/id Ci N/rw Cw 7 add 8 idiv string N/rc 0 N/gp 0 N/cp 0 N{ +rc 0 ne{rc 1 sub/rc X rw}{G}ifelse}imagemask restore}B/G{{id gp get/gp +gp 1 add N A 18 mod S 18 idiv pl S get exec}loop}B/adv{cp add/cp X}B +/chg{rw cp id gp 4 index getinterval putinterval A gp add/gp X adv}B/nd{ +/cp 0 N rw exit}B/lsh{rw cp 2 copy get A 0 eq{pop 1}{A 255 eq{pop 254}{ +A A add 255 and S 1 and or}ifelse}ifelse put 1 adv}B/rsh{rw cp 2 copy +get A 0 eq{pop 128}{A 255 eq{pop 127}{A 2 idiv S 128 and or}ifelse} +ifelse put 1 adv}B/clr{rw cp 2 index string putinterval adv}B/set{rw cp +fillstr 0 4 index getinterval putinterval adv}B/fillstr 18 string 0 1 17 +{2 copy 255 put pop}for N/pl[{adv 1 chg}{adv 1 chg nd}{1 add chg}{1 add +chg nd}{adv lsh}{adv lsh nd}{adv rsh}{adv rsh nd}{1 add adv}{/rc X nd}{ +1 add set}{1 add clr}{adv 2 chg}{adv 2 chg nd}{pop nd}]A{bind pop} +forall N/D{/cc X A type/stringtype ne{]}if nn/base get cc ctr put nn +/BitMaps get S ctr S sf 1 ne{A A length 1 sub A 2 index S get sf div put +}if put/ctr ctr 1 add N}B/I{cc 1 add D}B/bop{userdict/bop-hook known{ +bop-hook}if/SI save N @rigin 0 0 moveto/V matrix currentmatrix A 1 get A +mul exch 0 get A mul add .99 lt{/QV}{/RV}ifelse load def pop pop}N/eop{ +SI restore userdict/eop-hook known{eop-hook}if showpage}N/@start{ +userdict/start-hook known{start-hook}if pop/VResolution X/Resolution X +1000 div/DVImag X/IE 256 array N 2 string 0 1 255{IE S A 360 add 36 4 +index cvrs cvn put}for pop 65781.76 div/vsize X 65781.76 div/hsize X}N +/p{show}N/RMat[1 0 0 -1 0 0]N/BDot 260 string N/Rx 0 N/Ry 0 N/V{}B/RV/v{ +/Ry X/Rx X V}B statusdict begin/product where{pop false[(Display)(NeXT) +(LaserWriter 16/600)]{A length product length le{A length product exch 0 +exch getinterval eq{pop true exit}if}{pop}ifelse}forall}{false}ifelse +end{{gsave TR -.1 .1 TR 1 1 scale Rx Ry false RMat{BDot}imagemask +grestore}}{{gsave TR -.1 .1 TR Rx Ry scale 1 1 false RMat{BDot} +imagemask grestore}}ifelse B/QV{gsave newpath transform round exch round +exch itransform moveto Rx 0 rlineto 0 Ry neg rlineto Rx neg 0 rlineto +fill grestore}B/a{moveto}B/delta 0 N/tail{A/delta X 0 rmoveto}B/M{S p +delta add tail}B/b{S p tail}B/c{-4 M}B/d{-3 M}B/e{-2 M}B/f{-1 M}B/g{0 M} +B/h{1 M}B/i{2 M}B/j{3 M}B/k{4 M}B/w{0 rmoveto}B/l{p -4 w}B/m{p -3 w}B/n{ +p -2 w}B/o{p -1 w}B/q{p 1 w}B/r{p 2 w}B/s{p 3 w}B/t{p 4 w}B/x{0 S +rmoveto}B/y{3 2 roll p a}B/bos{/SS save N}B/eos{SS restore}B end + +%%EndProcSet +TeXDict begin 39158280 55380996 1000 600 600 (forside.dvi) +@start +%DVIPSBitmapFont: Fa cmssbx10 12 12 +/Fa 12 119 df<003FB612F04815FFB812E017F817FE83188018C0A249C714E0041F13F0 +827013F88282A218FC82A95E18F8A25E4C13F05E4C13E093B5FC90B812C0188018005F17 +F817E0178004F0C7FC49CAFCB3A76C5A123F364577C446>80 D<903801FFF8011F13FF90 +B612E0000381000F15FC82A249C66C7E01F86D1380D807E07F5B496D13C090C7FC1206C8 +FCA60207B5FC49B6FC131F137F48B512EF0007EBF80F4813C0481380481300485A5B12FF +5BA45D7F5D6C6C5B92B5FC383FFF8391B6FC6C14EF6C14CF6C148F6CD9FE071380C613F8 +D93FC0C8FC2A317DAF34>97 D<EEFFF0A24B13F8B3A2EB01FF011F13C1017F13F190B512 +FD000391B5FC5A5AECF01F48EBC007EC8001481300A2485AA4485AB0127F7FA36C7E5D6E +5A6C6D5A6CEBF03F91B6FC7E6C14FD6C14F96C6C01F013F0011F13C0D903FEC8FC2D467C +C438>100 D<EC7FF80103B57E011F14E0017F8090B612FC48815A489038F03FFF48D9C0 +0F1380EC800348010014C048804915E0A248487FA217F012FFA25BA390B7FCA317E0A201 +F8C9FCA37F127FA37F003F16C016016C6C14036E13076C6DEB1FE06E137F6C9038F803FF +6C90B6FC7E6C1680013FECFE00010F14F8010114E09026003FFEC7FC2C317DAF33>I<DA +FFF0EB0FC0010F01FF137F013FECC3FF90B8FC4817E05A48EDFE1F489039E07FFF00DA80 +1F140048496C7FA348486D7FAB6C6C495BA36C6D4890C7FCECE07F6C90B55A6C5D6C5D48 +5D16C0D8078F91C8FC018013F091CAFC7FA27F7F6CB612F0EEFF806C16E04816F8488200 +1F82488201F0C7003F1380484814078248486E13C0A282A46D5CA26C6C4A138001FC140F +263FFFC090B512006C90B65A6C5E6C5E6C5EC66C1580011F4AC7FC010014C033447EAE37 +>103 D<EA3FE0127F487EB3A3ED1FFE4B7E5D92B5FC4A5B4A5B4A5B4A13E04A5B4A5B4A +90C7FC4A5A01F15B01F75B90B55A5D5D5D92C8FCA28181A2818181A2497F496C7EEBF83F +496C7E01E0806E7F806E7F82806E7F826F7E153F6F7E1780816C487F003F6E1300294579 +C435>107 D<D83FF0D97FE049B47E007F902603FFFC010F13F026FFF80F01FF013F13FC +4A6E487F027F02C1B6FC91B612C301F903E71580DAF80FECE03F9026FBE0079038EF801F +D9FFC0DAFF0014C04A6C497FA202005C495DA3495DB3AB6C486D496D1380003F6E814A2F +7AAE57>109 D<EC3FFC0103B512C0011F14F8498090B7FC4816804816C048D9F81F13E0 +48D9C00313F04A7E4890C713F8A24848EC7FFCA2007F16FE49143FA400FF16FFAD007F16 +FE6D147FA36C6CECFFFCA26C6D4813F86E5A6CD9F00F13F06C90B612E0A26C16C0C61600 +6D5C011F14F8010714E09026007FFEC7FC30317DAF37>111 D<D83FF013F8007F130338 +FFF80F141F147FA214FF13F913FBA290B5120014F85C5C5C5C91C7FC5BA35BB3A76C5A12 +3F1D2F7AAE25>114 D<EB0FFF017F13F048B512FC000714FF4815C05AA2383FF8039039 +F0007F80151F4848130F15071503ED01006D90C7FC7F13FEEBFFE014FF6C14C015F06C80 +816C806C806C1580C6FC013F14C0130FD9007F13E0140714018012200070147F1278127C +127ED87F8013FF01E014C038FFFC0390B6FC16801600123F000F5C000314F8C614E0010F +90C7FC23317DAF2A>I<EBFFC05A487FAB003FEBFFFE5AB7FCA36C5CA2000301E0C7FCB3 +AAED0180ECF00315079138F83FC06C90B5FCA36C150015FC6D13F0011F13C0D907FCC7FC +223C7EBA28>I<D83FC0EC1FE0D87FF0EC3FF000FFED7FF86C6CECFFF0A27F003F4A13E0 +A36D5B001F16C0A27F6C4A1380A214806C4A1300A214C06C4A5AA214E06C4A5AA214F06C +4A5AA214F8017F495AA380D93FFD5BA291B5FC6D5CA36D5CA36D91C7FCA36D5B010013F8 +2D2E7EAD32>118 D E +%EndDVIPSBitmapFont +%DVIPSBitmapFont: Fb cminch 72.8481 2 +/Fb 2 87 df[<023FC5B612E00103C5B9FC010FA118FF013FA119FE49A1F1FFF890C5BD +12C048A11CFC48A1F4FFC048A11DF848A1F5FF8048A11EF0A11FFC48A1F6FF80A120F048 +A11FFCA120FFA121C0A121F0C5C212FCA121FFA122C0A122F0A122FCA18EA17C7EA18FA1 +23F0A18FA123FEA18FA1A17EA1A17EA1A112F0A1A17EA1A17EA1A17EA1A17EA1A17FA1A1 +7FA1A17FA1A17FA1A17FA1A17FA1A17FA1A17FA2A1A180A1A180A1A180A1A180A2A1A180 +52CF00018EA192C7123FA105008CA106078BA1F0007FA107078BA11900A1083F8AA10807 +8AA11A01A1746C89A187A1090F89A11B03A17589A1757EA17688A188A17688A188A188A1 +7689A188A17788A189A189A1A182A189A189A1A182A189A2A17788A2A189A2A17887A2A1 +8AA1A182A2A18AA3A1A182A18AA4A1781C80A5A18AA2A1A117C0A7A18AA2A1A117E0B3A9 +A1A117C0A3A166A6A1A11780A2A166A5A1A11700A166A4A15463A3A166A1A15EA2A166A2 +A1A15EA19BBDFCA2A15364A2A165A1A15EA165A2A15364A165A165A1A15EA165A19ABEC7 +FCA164A164A15264A164A15264A164A199BE5AA163A1090765A163A1093F65A198BF5AA1 +1A03A1080F66A11A3FA14FC0C8FCA1070F66A1197FA10607C05AA195C15AA1177FA10303 +C35A99C5BD5AA1A15CA2A1A15CA1A191C9FCA1A15BA1A15BA1A15BA1A15BA1A15BA1A15B +A1A15BA1A190CAFCA1A15AA1A15AA1A15AA1A15AA1A112C0A1A15AA1A1CBFCA123FCA16B +A123E0A16BA1A0CCFCA16AA122F8A122E0A12280A19FCDFCA121FCA121F0A12180A156CE +FCA120F8A120C0A19DCFFCA11FF8A11FC0A10CFCD0FCA11EE0A153D1FCA11DE0A10AFCD2 +FCA199D3FCA11B80A10880D4FCA106E0D6FC0B80D7D1FCB3B3B3B3B3B3B3B27E9AD7D2FC +A36C63A26C63A26C636C637E6C636C636D97D7D3FC6D61010F19F8010319E0D9003F95D7 +D4FC>331 420 72 547 425 80 D[<0107B900F8A158B812FC013FDEFF80A10F3FEFFF80 +90BB00F0A19EBA12E04808FCA10E0785000708FFA15619FC4875A10D3F850AE0A19CBBFC +4875A154864875A1541B8076A1664875A1541BC076A16677A16577A165BEA1A116E077A1 +9ABDFC77A164A277A1646CA1A120C077A164A26C76A1A11580A1A15EA26C76A1A11500A1 +A15EA26C77A15163A28A6CA1A14B63A26C77A1A15BA1A193BDFCA26C77A15064A36C77A1 +5064A26D76A1A15BA1A15DA26D76A1A15BA1A15DA26D76A15099C7FCA28B6DA1A14963A2 +6D77A16BA1A15DA26D77A196BD5AA36D77A14E64A26D77A16BA1A15CA26E76A16BA1A15C +A26E76A14E64A28B6EA15999C8FCA26E77A169A1A15CA26E77A14D63A36E77A194BD5AA2 +6E77A169A1A15BA26E77A169A1A15BA26F76A14C64A36F76A14C64A26F76A19EC9FCA1A1 +5BA26F77A14B63A36F77A14B63A26F77A167A1A190BDFCA26F77A167A1A15AA26F77A14A +64A37076A14A64A27076A167A1A15AA27076A19CCAFCA1A15AA27077A14963A27077A165 +A1A15AA27077A165A1A1BDFCA27077A14864A37077A14864A27176A165A16BA27176A165 +A16BA27176A14899CBFCA271A1A15D7D6BA27177A163A16BA27177A163A1A0BDFCA27177 +5864A271A1A15D7D6AA27276A163A16AA27276A163A16A72A1A191CCFC7D6AA27277A161 +A16AA27277A161A16AA272779EBD5AA272A1A15BA16C68A27277A161A169A27376A161A1 +6973A1A15AA16C68A273A1A1CDFCA16C68A27377A15FA169A27377A15FA16973A16BA16D +9CBDFCA273A16BA16D66A27377A15FA16874A16AA17FA16874A16AA16D66A274A19FCEFC +A16D66A27477A15DA16874A169A180A16874A169A16E9ABDFCA274A169A16E6474A169A2 +A16E6475A168A180A16775A168A180A16775A19DCFFCA16E6475A167A2A16F6375A167A1 +81A16775A167A18175A192BD5AA2A16F6275A167A2A16F6276A166A2A16F6276A166A181 +76A14999D0FCA2A18176A14963A2A1706176A165A276774F63A2A18276A190BD5AA2A182 +76A14864A2A182775964A277764E64A377764E99D1FCA377764E63A2777769A165A27777 +69A165A2777769A19ABDFCA277774C64A278A162A1715EA278A162A1715EA278769ED2FC +A16478A161A183A16478A161A184A16478A161A1725DA278A161A17292BDFC78A161A2A1 +725C79A160A2A1725C79A160A279764A99D3FCA2A184795563A2A184795563A2A1857955 +63A2797765A163A2797765A198BDFCA27A7665A1627AA15EA2A1735A7AA193D4FCA2A173 +5A7AA15DA2A119FE7A5363A27A0AFF64A162A27AA15DA11A9FA11ABF7AA15DA197BDFC7B +A15CA37BA15CA37BA191D5FCA37BA15BA27BA15BA37BA15BA37BA15BA27BA15BA37CA15A +A37CA15AA37CA1D6FCA27C6BA37C6BA37C6BA27C6BA37C6BA37D6AA37D6AA27D9FD7FCA3 +7D69A37D69A27D69A27D697D69A2A16C68A16C68A16C9DD7C6FCA16C67A16C67A16C67A1 +00001FE0A16D66A1011F9BD7C7FCA16D65A101011DF0A16D6C1CC0A1020309F8D7C8FC> +411 420 112 547 444 86 D E +%EndDVIPSBitmapFont +%DVIPSBitmapFont: Fc pvv 90 1 +/Fc 1 81 600 300 dfs[<171CEFFF80040313E0041F13FC93B67E030715E0033F15FC92 +B87E020717F0023F17FC49BA7E010F19F0013F19FC48BC12E0120FBCEAF9C000CFF2E180 +00C31A03D8C07F06F890D7CAFC010F18E00103F00007D9007F04F81306021F16E0020393 +C71207DA007F02F880031F14C0030391C8FC030001F8ED8380DC1FC0913807F1C00403C8 +EA3FFC4C9238FC1FE0040E913807E0074C91393F8000FC041802FCC7EA3F800438D903E0 +EC07E00430496CEC00FC0470D9067EED3F80046090260E1FC0EC07E095261C03F0EC00FC +952618007EED3F80E01F80EC07E00638D903F0EC00FC0630D900FEED3F80E11F80EC07E0 +E103F0EC00FC0470DC00FCED3F800430DD1F80EC07E0E207F0EC00FC04380138DB00FC15 +3F700118DC1F80EC07E0040CDE07E0EC01FC040E011CDC00FCEC003F70010CDD3F80EC07 +E00406010EDD07E0EC01FC040E6DDD00FCEC003F4C6D063FED07E0041849DE07E0EC01FC +0438010EDE01FCEC003F0430010CDE003FED07E0061CDF07E0EC01FC0618DF01F8EC003F +0470E1003FED07E004600138E00FE0EC01F80630E001F8EC003FE7003FED0FE0E80FC0EC +01F8E801F8EC003FE8007FED0FE00470E40FC0EC01F80430E401F8EC003F0638E2007EED +0FE004380118E30FC0EC01F80418E503F8EC003F041C011CE3007EED0FE0040C010CE40F +C0EC01F8040E010EE403F0EC003F706DE4007EED0FC0706C6C6CE41FC0EC01F8706C6C6C +E403F0EC007FA1DA007EED0FC0058049E51F80EC01F804030103E603F0EC007F050090D4 +00FEED0FC04C49E71F80EC01F804060106E703F0EC007FA1DC00FCED0FC0A1DD1F80EC01 +F8040E010EE807F0EC007C040C010CE800FCEC01FCA1DE1F80EB0FCCA1DE07E0EB7F0CA1 +953900FC03F8A196383F9FC0060EA13807FE000606A1EA00F0040EA11560160618078404 +078070130105807F04016D7E711370706C7F05707F71130C8371131C05061318A2050E13 +38050C1330171C1718A417381730A40538133805181318A11C1C071CA1147C070C57ED03 +F0051C010E10E0EC0FC0050C6D10F8023ECAFC7310FF14F8050E6E9F38C063E005066D6C +9F38F86F8005076D6CE8FE7ECBFC716C0170FAFFFE0501023CFBFFC0726DA112F0716C01 +0EA112FE0670010CA16C7E72A115FC061EA115EC72011C7A168C9526038018DCFFF8091F +ECFE0C0601050701FF090714F8060394271FF00FC0080014E0070093273FE001E0093F13 +809B277FC00078983807FC005348486DF301F04E4C030EF30060060695C77E53486E7E08 +1C020F6F7E080C021F6F7E541570080E023F1630080619382218060701074A48151C726D +6C180C0801190E751806736C6C13FF060102701807736D840600143C73010E8007606D7E +07706D7E0730EB00F007389138707FFE7314307382731470736CD9603F7FDF01E061736C +701406083C6E7F081F190E08076E6D140C74017080E230076D141C776D5C776D6C13307A +1370E2380002F05B0A186D9038FE01C00C1F9038FFC7800A1C6D02FFCFFC0A0C6D14FC0A +0E01015C76D9003F13E076DA07FED0FC7790D2FC756C7E08016D7E1D70757F0800807513 +0F09606D7E0970EB01F00930D900FC153E0938021F157F7502074B7E090C85090E140687 +756C1307E101E06D6F5A756C71CEFC0A3894CFFC1C1EE20F807F993803F001F400FC0B1E +7FF50E000B0C7FD90F801C6002E01C7002F8080E7F02FF08067F03C08703F887DA3FFEF3 +03C0912607FF8006076D7E020101E072EB00789126003FF01B3FDB0FF873EB0FF0DB03FC +06011401DB00FE73EB0030047E1800DC3EF084041E19706E6E0630143802E00938141802 +F88702FED93E7C72141C9126FFC07E736C130CDBF0FE737E91273FFFFC3EDE00F0130E02 +0F01F8087C7F020101F0081F7F9127003FE01FDF07F07F92C7973901FC01C0081E933900 +1C00E0716C013E050C13708E72017E050E7F0507030F0406130F08FCF107C0716C01F86D +EF01F8070106079038007FE090C903F071EC0FF0942601F0036D6CF0003008E084070706 +011538DD00F8496C6C701418070F1800DF1F8072141C067C6E6C0470140CDF3F0084E401 +E06D140E00F0DD3E7E6D6C7080007C067C0403020F80001FDD1FFCDF038080D807C04D02 +7C01076E6C6D7ED801F053D900F06D7ED8007C7048040F037C1470011F744ADA1F807FD9 +07C04C041FDB07FC7FD901F0030795C938FFC00FD9007C4C6E4904076D7E021F093E0400 +EB01F0DA07C091C9027E9438E000FEDA01F095260F807C056090381FFF80DA007808FC07 +03190E031E726C480570EB00016F6C06C106306F170FDB03E04F1A00DB00F8DD03E30638 +6F84043E4F05180360EF0DC0DC0F8005E7061C0370170CDC03E0932601F7C071033084DC +00F805FF060603381870053E4E05076FEF1C38DD0F806F736C020CEF781CDD03E094CB6C +6C020E4C487EDD00F8776C6E933907C00780063E047E07706E6C92391F0003E0DE0F800B +3CDA01E0033CEB00F8DE03E0037C736E6C03F0143EDE00F8033CDF0780023CDA63E09138 +0FE00F073E92CDD803E0021FDA6F800203B5FCDF0F80E200FCDA07E0017EC9EA3FFEDF03 +E0E33FC0902701FE01F8EE003EDF00F89A2A07FFF0003FFFE0177E083EE3007F020390CA +EA01FEE00F80E3003090CC1207E003E00C381A1FE000F80C181A7F093C0C1C1AFF090F0C +0C1903E107C00B0E190FE101F00B06193FE1007C0B0796B5FC0A1F776C5FE207C0766C17 +07E201F0766C171FE2007C0B70177F0B1F774CB6FCE307C0765EE301F076160FE3007C76 +6C153F0C1F766C92B7FCE407C0E100F81403E401F00A7E5CE4007C99260FE001B8FC0D1F +0A03BAFCE507C0E1003F133FE501F099C7FCF7007C201FF807C0F801F0F8007C211EF907 +80F903E0F900F8223EFA0F80FA03E0FA00F8233EFB0F80FB03E0FB00F8A1123EA1EA0F80 +A1EA03E0A1EA00F8A1133EA1EB0F80A1EB03E0A1EB00F8A1143EA1EC0F80A1DA03E01CFC +A1DA00F81CF0A1033E1CC0A1030F1C80A1DB03C0F2FE00A1DB01F01AF8A1DB007C1AE0A1 +041F62A1DC07C096C7FCA1DC01F018FCA1DC007C60A1051F18E0A1DD07C01780A1DD01F0 +4CC8FCA1DD007C5EA1061F16F0A1DE07C015C0A1DE01F05DA1DE007C4AC9FCA1071F14F8 +A1DF07C05BA1DF01F013C0A1DF007C90CAFCA1F21F3CA1F207F8A1F201E0A1F20060> +264 375 17 501 1494 80 D E +%EndDVIPSBitmapFont +%DVIPSBitmapFont: Fd cmr12 12 6 +/Fd 6 58 df<B612C0A61A067F9721>45 D<14FF010713E090381F81F890383E007C01FC +133F4848EB1F8049130F4848EB07C04848EB03E0A2000F15F0491301001F15F8A2003F15 +FCA390C8FC4815FEA54815FFB3A46C15FEA56D1301003F15FCA3001F15F8A26C6CEB03F0 +A36C6CEB07E0000315C06D130F6C6CEB1F806C6CEB3F00013E137C90381F81F8903807FF +E0010090C7FC28447CC131>48 D<143014F013011303131F13FFB5FC13E713071200B3B3 +B0497E497E007FB6FCA3204278C131>I<EB03FE90381FFFC0017F13F03901F80FFC3903 +C001FE48486C7E000EC7EA7F8048EC3FC0ED1FE04815F00030140F007015F80060140712 +6CB415FC7F7F1503A46C4813076CC7FCC8FC16F8A2150F16F0151F16E0A2ED3FC0ED7F80 +16005D5D4A5A4A5A4A5A5D4A5A4A5A4AC7FC147C5C5C495A495A495A49C7120C131E5B01 +3814185B5B485A4848143848C81230000E1570001FB612F0A25A5AB712E0A326427BC131 +>I<000615C0D807C0130701FCEB7F8090B612005D5D5D15E0158026063FFCC7FC90C9FC +AE14FF010713C090381F01F090383800FC01F0137ED807C07F49EB1F8016C090C7120F00 +0615E0C8EA07F0A316F81503A216FCA5123E127F487EA416F890C712075A006015F0A200 +70140F003015E00038EC1FC07E001EEC3F806CEC7F006C6C13FE6C6C485A3901F807F039 +007FFFE0011F90C7FCEB07F826447BC131>53 D<14FF010713E0011F13F890387F80FC90 +38FC007E48487F4848EB1F804848EB0FC0000FEC07E0485AED03F0485A16F8007F140190 +C713FCA25AA216FE1500A516FFA46C5CA36C7E5D121F7F000F5C6C6C1306150E6C6C5B6C +6C5BD8007C5B90383F01E090390FFF80FE903801FE0090C8FC150116FCA4ED03F8A216F0 +D80F801307486C14E0486C130F16C0ED1F80A249EB3F0049137E001EC75A001C495A000F +495A3907E01FE06CB51280C649C7FCEB1FF028447CC131>57 D E +%EndDVIPSBitmapFont +%DVIPSBitmapFont: Fe cmr17 17.28 21 +/Fe 21 122 df<B712F0A7240780A12B>45 D<933801FFE0043F13FF4BB612E003079038 +003FF8DB1FF0EB03FEDB7FC0903800FF804A48C8EA3FE0DA03FCED0FF0DA0FF0ED03FC4A +486F7E4A486F7E4A48707E4ACA6C7E4948717E4948717E4948717E4948717E4948717E01 +3F854A83017F864948727EA24890CC6C7EA24848737EA24848737EA2000F87491907001F +87A34848737EA4007F1C80A24985A400FF1CC0AF6C6C4F1380A5003F1C006D61A3001F63 +A26D190F000F63A26C6C4F5AA36C6C4F5AA26C6D4E5A6C636E18FF017F626D6C4D90C7FC +6E5F011F616D6C4D5A6D6C4D5A0103616E171F6D6C4D5A6D6D4C5ADA3FC04CC8FCDA1FF0 +ED03FE6E6C4B5A6E6C4B5ADA01FFED3FE09126007FC0ECFF80DB1FF0D903FEC9FCDB07FF +EB3FF8030190B512E0DB003F91CAFC040113E05A667AE367>79 D<B912C018FEF0FFC019 +F0C601FCC813FCD93FF8ED0FFF011F04037F06007FF13FF0737E737E1907737E86731380 +A27313C0A31BE01A7FA21BF0A91BE0A21AFF1BC0A34F13801B00614F5A624F5A4F5AF17F +E04F5A060390C7FCF01FFE943801FFF891B812E096C8FC18F802F8CCFCB3B3A4497E90B5 +FCB7FCA44C6279E15A>I<933801FFE0043F13FF4BB612E003079038003FF8DB1FF0EB03 +FEDB7FC0903800FF804A48C8EA3FE0DA03FCED0FF0DA0FF8ED07FCDA1FE0ED01FE4A486F +7E4A48707E4ACA6C7E4948717E4948717E4948717E010F854948717E4948717EA2494871 +7F01FF864A187F4890CC6C7EA2488749191F00078749190F000F87A2001F87491907A200 +3F87A24985A2007F1C80A44985A200FF1CC0AF007F1C806D61A4003F1C00A36D61001F63 +A36C6C4F5AA20007636D191FA26C6C4F5AA26C636C6DDA3F804A5AEFFFE06D6C010301F8 +4A5A6D6C902607C07C4990C7FC93380F001E6D6C011E6D495A6D6C6F495A0107021CD903 +805B6D6C013C6D6C485A6E0138151F6D6C0300495A6D01806F485ADA3FC04CC8FCDA1FE0 +ED71FE91260FF83CEC77FC912607FC1CEC7FF8912601FF1EEC3FE09126007FDEECFF80DB +1FFFD903FEC9FC03079038C03FF8030190B56C1560DB003F143C0401EBE01C93C8121EA2 +1DE0191FA3736C13011DC0741303A274130774130F736CEB1F8074133F9738FF01FF7390 +B51200A264856485745B745B745B08071380E001FEC7FC5B807AE367>I<B812FCEFFFE0 +18FCF0FF80C601FCC7000F13E0D93FF89138007FF8011FEE1FFCF007FF06017F727FF13F +E0737E86737E737EA2868587A28587A96361A298C8FC6162624F5A191F4F5A4F5AF1FF80 +4E90C9FCF007FEF01FF8F0FFE0050F138091B700FCCAFC18E08402F8C7EA1FFE943801FF +80716C7EF03FF0727EF007FC727E85727F8486737EA3737EAA86AA1DE086191FA3070F14 +017414C007071403496C8390B570EC0780B76F9038800F00736D5A97383FF03E97380FFF +FCCD000313F09738003FC05B6479E162>I<EC3FF0903803FFFE010F6D7E90393FC03FE0 +90397E0007F801F86D7ED801E06D7E48486D7E48486E7E48C86C7E7F01F06E7E487E6D6E +7EA3707EA36C5AEA03E0C9FCA6167FED7FFF020FB5FC91387FF807903801FF80903807FC +00EB1FF0EB7FC0495AD803FEC7FC485A120F5B485A485AA2484817E0A312FF5BA2160FA3 +161F6D141B007F153B16736D913971FC01C06C6C14E1001FEC01C1D80FFC903A0780FE03 +806C6C903A0F00FF07002701FF807E6DB4FC27007FFFF86D5A011F01E0EB1FF8010190C7 +EA07E03B417ABF42>97 D<4AB47E020F13F8023F13FE9139FF007F80D903FCEB07E0D907 +F0EB01F0D91FE0EB007849488049488049C87E48485D4915FF00034B138048485CA2485A +A2485AA2003F6F130049EC007C94C7FC127FA35B12FFAD127F7FA4123F7FA2001FEE01C0 +7F000F16036D168012076C6C15076D160000015E6C6C151E6D6C5C6D6C5C6D6C5CD90FF8 +495AD903FCEB07C0903A00FF803F8091263FFFFEC7FC020F13F80201138032417CBF3A> +99 D<181EEF3FFEEE07FFA4EE000F1703A21701B3AAEDFF80020F13F8023F13FE9139FF +803F81903A03FC0007C14948EB01E1D91FE0EB00F94948147D4948143D49C8121F484815 +0F491507120348481503491501120F121F5BA2123F5B127FA45B12FFAD127F7FA3123FA2 +7F121FA26C6C1503A26C6C150712036D150F6C6C151F0000163D137F6D6CECF9FF6D6CEB +01F1D90FF0D903C113C06D6CD90F81EBFF80D901FFEB7F019039007FFFFC021F13E00201 +010091C7FC41657CE349>I<EC03FE91381FFFE091B512F8903901FE03FE903A07F0007F +8049486D7ED93FC06D7E49C76C7E496E7E49140348488148481401000782491400000F82 +83485A1880123F49153FA2007F17C0A35BA212FF90B8FCA30180CAFCA9127F7FA3123FA2 +7F121FEF01C06C7E17036C6C1680A26C6C15070001EE0F006D150E6C6C151E6D6C5C6D6C +5C6D6C5CD907F0EB03E0D903FC495A902700FF803FC7FC91383FFFFC020F13F002011380 +32417CBF3A>I<ED0FF0ED7FFC4AB5FC913907F81F8091390FE00FC091381FC03F91393F +807FE0EC7F005C495A5C0103EC3FC0A24948EB0F0093C7FCA2495AB3A5B712F0A426000F +F0C8FCB3B3B0497EEB3FFE003FB6FCA42B657EE428>I<EB03C0EA07FFB5FCA41201EA00 +7FA2133FB3AAEE7FE0923803FFFC030F13FFDB3F0013C00378EB1FE04B6D7EDAC1C06D7E +DAC3808002C7C7120302CE81170114DC14D802F86E7E5CA35CA35CB3B3496C4A7F496C4A +7FB6D8F003B612C0A442647DE349>104 D<133C13FF487F487FA66C5B6C90C7FC133C90 +C8FCB3A2EB03C0EA07FF127FA41201EA007FA2133FB3B3AC497E497EB612E0A41B5F7DDE +23>I<EB03C0EA07FFB5FCA41201EA007FA2133FB3AB0403B512F8A40400148094387FFC +0018E06095C7FC177E5F17F04C5A4C5A4C5A4CC8FC163E5E5E4B5A4B5A4B5A4B5A151F4B +7E4B7E15FF02C17F9138C3CFF8ECC7879138CF07FC9138FE03FEECFC0102F87F4A6C7F4A +137F4A80707E161F83707E160783707E160183707F177F84717E171F84717E84A284496C +EDFF80496C4A13E0B600F090B6FCA440647CE346>107 D<D903C0EB7FE0D807FF903803 +FFFCB5010F13FFDB3F0013C00378EB1FE04B6D7E0001D9C1C06D7E27007FC3808002C7C7 +1203D93FCE81170114DC14D802F86E7E5CA35CA35CB3B3496C4A7F496C4A7FB6D8F003B6 +12C0A4423F7DBE49>110 D<EDFF80020F13F8023F13FE9139FF007F80D903FCEB1FE0D9 +07F0EB07F0D90FC0EB01F8D93F80EB00FE49C8127F017E81496F7E48486F7E0003834915 +0700078348486F7EA2001F83491501A2003F83A348486F7EA400FF1880AC007F1800A26D +5DA2003F5FA36C6C4B5AA36C6C4B5A00075FA26C6C4B5A6C6C4B5AA26C6C4B5A017F4BC7 +FC6D6C14FE6D6C495AD90FF0EB07F8D903FCEB1FE0D900FFEB7F806EB5C8FC020F13F802 +0113C039417CBF42>I<9039078003F8D807FFEB0FFFB5013F13C092387C0FE0913881F0 +1F9238E03FF00001EB838039007F8700148FEB3F8E029CEB1FE0EE0FC00298EB030002B8 +90C7FCA214B014F0A25CA55CB3B0497EEBFFF8B612FCA42C3F7CBE33>114 +D<9139FFE00180010FEBFC03017FEBFF073A01FF001FCFD803F8EB03EFD807E0EB01FF48 +487F4848147F48C8123F003E151F007E150F127CA200FC1507A316037EA27E7F6C7E6D91 +C7FC13F8EA3FFE381FFFF06CEBFF806C14F86C14FF6C15C06C6C14F0011F80010714FED9 +007F7F02031480DA003F13C01503030013E0167F00E0ED1FF0160F17F86C15071603A36C +1501A37EA26C16F016037E17E06D14076DEC0FC06D1580D8FDF0141FD8F8F8EC7F00013E +14FC3AF01FC00FF80107B512E0D8E001148027C0003FF8C7FC2D417DBF34>I<1438A714 +78A414F8A31301A31303A21307130F131FA2137F13FF1203000F90B6FCB8FCA3260007F8 +C8FCB3AE17E0AE6D6CEB01C0A316036D6C148016076D6C14006E6C5A91383FC01E91381F +F07C6EB45A020313E09138007F802B597FD733>I<D903C0150FD807FFED1FFFB50203B5 +FCA40001ED0007D8007F1501A2013F81B3B25FA35FA35F011F15066E140E5F130F6E4A7F +01075D6D6C494813E0D901FE4948EBFFC0903A00FFC01F8091393FFFFE00020F13F80200 +01C0EC800042407DBE49>I<B66C49B512E0A4000101F8C8387FFE0026007FE0ED1FF819 +E0013F705A61131F6E93C7FC130F180E6E151E0107161C8001035EA26E15780101167080 +6D5EA26F1301027F5DA26E6C495AA26F1307021F92C8FCA26E6C130EA26F131E0207141C +A26F133C020314388102015CA26F13F06E5C168092387F81C0A216C3033F5B16E3DB1FE7 +C9FCA216FF6F5AA26F5AA36F5AA26F5AA36F5A433F7FBD46>I<B66C49B512E0A4000101 +F8C8387FFE0026007FE0ED1FF819E0013F705A61131F6E93C7FC010F160EA26D6C5DA26E +153C01031638A26D6C5DA26E15F06D5EA26E6C495AA26F1303023F5DA26F1307021F92C8 +FC6F5B020F140EA26F131E0207141C6F133C02031438A26F1378020114706F13F06E5CA2 +1681037F5B16C3033F5BA216E7031F90C9FC16FF6F5AA36F5AA26F5AA36F5AA26F5AA215 +015E15035EA2150793CAFC5D150EA2151E151C153CD81F801338487E486C5BA25D14015D +49485A383F80074948CBFC001E133E380FC0FC6CB45A000113E06C6CCCFC435B7FBD46> +121 D E +%EndDVIPSBitmapFont +end +%%EndProlog +%%BeginSetup +%%Feature: *Resolution 600dpi +TeXDict begin +%%BeginPaperSize: a4 +a4 +%%EndPaperSize + +%%EndSetup +%%Page: 1 1 +1 0 bop 1248 872 a Fe(Python)43 b(Quic)l(k)h(Reference)1170 +1054 y(Ov)l(erheads)f(fra)g(Python-kurs)1719 1478 y Fd(1999-10-25)727 +4886 y Fc(P)1590 4691 y Fb(PV)o(V)p 1584 4744 1300 4 +v 1708 4838 a Fa(Programva)m(reverkstedet)p 1584 4886 +V eop +%%Trailer +end +userdict /end-hook known{end-hook}if +%%EOF diff --git a/forside.tex b/forside.tex new file mode 100644 index 0000000..2497866 --- /dev/null +++ b/forside.tex @@ -0,0 +1,33 @@ +\documentclass{article} + +\title{Python Quick Reference\\ + Overheads fra Python-kurs} +\author{} +\date{1999-10-25} +\pagestyle{empty} + +\begin{document} +\begin{titlepage} +\maketitle +\thispagestyle{empty} + +\vspace{10cm} + +\begin{center} +\begin{minipage}[t]{8cm}\raggedright +{\large\bfseries\sffamily +\font\pvv=pvv +\font\inch=cminch scaled 700 +\noindent +\centerline{{\hspace{-1.2cm}\pvv P}\quad +\parbox[b]{5.5cm}{\vbox{{\inch PVV}\medskip +\hrule +\smallskip +\centerline{Programvareverkstedet} +\smallskip +\hrule}}}} +\end{minipage} +\end{center} + +\end{titlepage} +\end{document} \ No newline at end of file diff --git a/handouts.ps b/handouts.ps new file mode 100644 index 0000000..37156e6 --- /dev/null +++ b/handouts.ps @@ -0,0 +1,6910 @@ +%! PS-Adobe-1.0 +%%Title: Handouts for Python-kurs +%%Creator: Vebjorn Ljosa +%%Pages: 12 +%%EndComments + +%%BeginProlog +/cm { 28.346 mul } def +/mm { 2.8346 mul } def +/a4width 210 mm def +/a4height 297 mm def + +/scalefactor 0.5 def +/innermargin 50 mm def +/topmargin 4 cm def +/slidedistance 0.5 cm def + +/slidewidth a4height scalefactor mul def +/slideheight a4width scalefactor mul def +/outermargin a4width slidewidth sub innermargin sub def +/bottommargin a4height topmargin sub slideheight 2 mul sub slidedistance sub def + + +/slidecounter 1 def + +% draw a box the size of an A4 sheet +/a4box { +gsave +1 setlinewidth +0 0 moveto +a4width 0 lineto +a4width a4height lineto +0 a4height lineto +0 0 lineto +stroke +grestore +} def + +/preslide { +save +slidecounter 1 eq { + innermargin bottommargin slideheight 2 mul add slidedistance add translate +} if +slidecounter 2 eq { + innermargin bottommargin slideheight add translate +} if +slidecounter 3 eq { + outermargin bottommargin slideheight 2 mul add slidedistance add translate +} if +slidecounter 4 eq { + outermargin bottommargin slideheight add translate +} if +scalefactor scalefactor scale +-90 rotate +a4box +/showpage {} def +} def + +/postslide { +restore +slidecounter 2 eq { showpage } if +slidecounter 4 eq { showpage } if +/slidecounter slidecounter 1 add def +slidecounter 5 eq { /slidecounter 1 def } if +} def + +%%EndProlog + + +%%BeginSetup +% Setter origo +0 0 mm translate + +%%EndSetup + +%%Page: 1 12 +%%BeginPageSetup +save +%%EndPageSetup + +preslide +%!PS-Adobe-3.0 +%%Creator: Basser Lout Version 3.08 (May 1996) +%%CreationDate: Fri Sep 17 13:15:54 1999 +%%DocumentData: Binary +%%DocumentNeededResources: (atend) +%%DocumentSuppliedResources: (atend) +%%Pages: 1 0 +%%BoundingBox: 0 0 595 842 +%%EndComments + +%%BeginProlog +%%BeginResource: procset LoutStartUp +/m { 3 1 roll moveto show } bind def +/s { exch currentpoint exch pop moveto show } bind def +/k { exch neg 0 rmoveto show } bind def +/ul { gsave setlinewidth dup 3 1 roll + moveto lineto stroke grestore } bind def +/in { 1440 mul } def +/cm { 567 mul } def +/pt { 20 mul } def +/em { 120 mul } def +/sp { louts mul } def +/vs { loutv mul } def +/ft { loutf mul } def +/dg { } def + +/LoutGraphic { + /louts exch def + /loutv exch def + /loutf exch def + /ymark exch def + /xmark exch def + /ysize exch def + /xsize exch def +} def + +/LoutFont +{ findfont exch scalefont setfont +} bind def + +/LoutRecode { + { findfont dup length dict begin + {1 index /FID ne {def} {pop pop} ifelse} forall + /Encoding exch def + currentdict end definefont pop + } + stopped pop +} bind def + +/BeginEPSF { + /LoutEPSFState save def + /dict_count countdictstack def + /op_count count 1 sub def + userdict begin + /showpage { } def + 0 setgray 0 setlinecap + 1 setlinewidth 0 setlinejoin + 10 setmiterlimit [] 0 setdash newpath + /languagelevel where + { pop languagelevel + 1 ne + { false setstrokeadjust false setoverprint + } if + } if +} bind def + +/EndEPSF { + count op_count sub { pop } repeat + countdictstack dict_count sub { end } repeat + LoutEPSFState restore +} bind def +%%EndResource + +%%BeginResource encoding vec2 +/vec2 [ +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quoteright +/parenleft /parenright /asterisk /plus /comma /hyphen /period /slash +/zero /one /two /three /four /five /six /seven +/eight /nine /colon /semicolon /less /equal /greater /question +/at /A /B /C /D /E /F /G +/H /I /J /K /L /M /N /O +/P /Q /R /S /T /U /V /W +/X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore +/quoteleft /a /b /c /d /e /f /g +/h /i /j /k /l /m /n /o +/p /q /r /s /t /u /v /w +/x /y /z /braceleft /bar /braceright /asciitilde /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /quotedblleft /quotedblright /fi +/fl /endash /emdash /bullet /dagger /daggerdbl /florin /fraction +/dotlessi /grave /acute /circumflex /tilde /macron /breve /dotaccent +/dieresis /.notdef /ring /cedilla /.notdef /hungarumlaut /ogonek /caron +/space /exclamdown /cent /sterling /currency /yen /brokenbar /section +/dieresis /copyright /ordfeminine /guillemotleft /logicalnot /hyphen /registered /macron +/degree /plusminus /twosuperior /threesuperior /acute /mu /paragraph /periodcentered +/cedilla /onesuperior /ordmasculine /guillemotright /onequarter /onehalf /threequarters /questiondown +/Agrave /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla +/Egrave /Eacute /Ecircumflex /Edieresis /Igrave /Iacute /Icircumflex /Idieresis +/Eth /Ntilde /Ograve /Oacute /Ocircumflex /Otilde /Odieresis /multiply +/Oslash /Ugrave /Uacute /Ucircumflex /Udieresis /Yacute /Thorn /germandbls +/agrave /aacute /acircumflex /atilde /adieresis /aring /ae /ccedilla +/egrave /eacute /ecircumflex /edieresis /igrave /iacute /icircumflex /idieresis +/eth /ntilde /ograve /oacute /ocircumflex /otilde /odieresis /divide +/oslash /ugrave /uacute /ucircumflex /udieresis /yacute /thorn /ydieresis +] def +%%EndResource + +%%BeginResource: procset LoutMarginNotes +% @PrependGraphic file /usr/local/lib/lout/include/dl.lpg + +% path for @Box symbol +/LoutBox +{ 0 0 moveto xsize 0 lineto + xsize ysize lineto 0 ysize lineto + closepath +} def + +% path for @CurveBox symbol +/LoutCurveBox +{ xmark 0 moveto + xsize xmark sub xmark xmark 270 360 arc + xsize xmark sub ysize xmark sub xmark 0 90 arc + xmark ysize xmark sub xmark 90 180 arc + xmark xmark xmark 180 270 arc + closepath +} def + +% path for @ShadowBox symbol +/LoutShadowBox +{ xmark 2 mul 0 moveto xsize 0 lineto + xsize ysize xmark 2 mul sub lineto + xsize xmark sub ysize xmark 2 mul sub lineto + xsize xmark sub xmark lineto + xmark 2 mul xmark lineto + closepath +} def + +% set up dictionary containing margin note data: parity LoutMargSet - +/LoutMargSet +{ /LoutMargDict 12 dict def + LoutMargDict begin + /parity exch def + /matr matrix currentmatrix def + /rightx xsize def + /lefty ysize def % highest allowable point for top of next left note + /righty ysize def % highest allowable point for top of next right note + /max { 2 copy gt { pop } { exch pop } ifelse } def + /min { 2 copy lt { pop } { exch pop } ifelse } def + end +} def + +%translate coordinate system for marginal notes: type LoutMargShift - +% where type 0 is left margin, 1 is right margin, 2 is outer, 3 is inner +/LoutMargShift +{ LoutMargDict begin + + % y coordinate of top of note, in margin coords, before vertical adjust + 0 ysize transform matr itransform exch pop + + % decide whether left or right margin based on type and parity + exch [ 0 1 parity 1 parity sub ] exch get 0 eq + { + % left margin: adjust top of note downwards if overlaps previous note + lefty min + + % bottom of note is new lefty position and also translate position + ysize sub dup /lefty exch def + + % want right edge of note at coordinate zero + xsize neg exch + } + { + % right margin: adjust top of note downwards if overlaps previous note + righty min + + % bottom of note is new righty position and also translate position + ysize sub dup /righty exch def + + % want left edge of note at coordinate rightx + rightx exch + } ifelse + + % stack now contains coord of bottom left corner in margin coordinates + matr setmatrix translate + end +} def + +% create LoutPageDict with left, right, foot, top for @Place symbol users +/LoutPageSet +{ + /LoutPageDict 5 dict def + LoutPageDict begin + /matr matrix currentmatrix def + /left 0 def + /right xsize def + /foot 0 def + /top ysize def + end + +} def + +%%EndResource + +%%EndProlog + +%%BeginSetup +%%IncludeResource: font Times-Roman +/Times-Romanfnt82 vec2 /Times-Roman LoutRecode +/fnt82 { /Times-Romanfnt82 LoutFont } def +%%IncludeResource: font Helvetica +/Helveticafnt35 vec2 /Helvetica LoutRecode +/fnt35 { /Helveticafnt35 LoutFont } def +%%EndSetup + +%%Page: 1 1 +%%BeginPageSetup +%%PageResources: font Times-Roman +%%+ font Helvetica +/pgsave save def +0.0500 dup scale 10 setlinewidth +%%EndPageSetup + +gsave +0 0 translate +320 fnt82 0.0 0.0 0.0 setrgbcolor 11900 16840 0 0 320 384 80 LoutGraphic +gsave +LoutPageSet +grestore +gsave +0 0 translate +90.0000 rotate + +grestore + +grestore +gsave +0 0 translate +90.0000 rotate +gsave +1417 -9065 translate +320 fnt82 0.0 0.0 0.0 setrgbcolor 14006 7648 0 7648 320 384 80 LoutGraphic +gsave +1 LoutMargSet +grestore +160 fnt82 0.0 0.0 0.0 setrgbcolor 13942 7540(1)m 480 fnt35 5182 6046(Innf\370)m 26(r)k -7(ing)k +7157(i)s 7364(Python)s 320 fnt35 5881 4266(Steinar)m 6978(Kn)s 3(utsen)k + +grestore + +grestore + +pgsave restore +showpage + +%%Trailer +%%DocumentNeededResources: font Courier +%%+ font Helvetica +%%+ font Helvetica-Oblique +%%+ font Symbol +%%+ font Times-Roman +%%+ font Times-Italic +%%+ font Times-Bold +%%DocumentSuppliedResources: procset LoutStartUp +%%+ procset LoutMarginNotes +%%+ encoding vec2 +%%Pages: 23 +%%EOF + +postslide + +preslide +%!PS-Adobe-3.0 +%%Creator: Basser Lout Version 3.08 (May 1996) +%%CreationDate: Fri Sep 17 13:15:54 1999 +%%DocumentData: Binary +%%DocumentNeededResources: (atend) +%%DocumentSuppliedResources: (atend) +%%Pages: 1 0 +%%BoundingBox: 0 0 595 842 +%%EndComments + +%%BeginProlog +%%BeginResource: procset LoutStartUp +/m { 3 1 roll moveto show } bind def +/s { exch currentpoint exch pop moveto show } bind def +/k { exch neg 0 rmoveto show } bind def +/ul { gsave setlinewidth dup 3 1 roll + moveto lineto stroke grestore } bind def +/in { 1440 mul } def +/cm { 567 mul } def +/pt { 20 mul } def +/em { 120 mul } def +/sp { louts mul } def +/vs { loutv mul } def +/ft { loutf mul } def +/dg { } def + +/LoutGraphic { + /louts exch def + /loutv exch def + /loutf exch def + /ymark exch def + /xmark exch def + /ysize exch def + /xsize exch def +} def + +/LoutFont +{ findfont exch scalefont setfont +} bind def + +/LoutRecode { + { findfont dup length dict begin + {1 index /FID ne {def} {pop pop} ifelse} forall + /Encoding exch def + currentdict end definefont pop + } + stopped pop +} bind def + +/BeginEPSF { + /LoutEPSFState save def + /dict_count countdictstack def + /op_count count 1 sub def + userdict begin + /showpage { } def + 0 setgray 0 setlinecap + 1 setlinewidth 0 setlinejoin + 10 setmiterlimit [] 0 setdash newpath + /languagelevel where + { pop languagelevel + 1 ne + { false setstrokeadjust false setoverprint + } if + } if +} bind def + +/EndEPSF { + count op_count sub { pop } repeat + countdictstack dict_count sub { end } repeat + LoutEPSFState restore +} bind def +%%EndResource + +%%BeginResource encoding vec2 +/vec2 [ +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quoteright +/parenleft /parenright /asterisk /plus /comma /hyphen /period /slash +/zero /one /two /three /four /five /six /seven +/eight /nine /colon /semicolon /less /equal /greater /question +/at /A /B /C /D /E /F /G +/H /I /J /K /L /M /N /O +/P /Q /R /S /T /U /V /W +/X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore +/quoteleft /a /b /c /d /e /f /g +/h /i /j /k /l /m /n /o +/p /q /r /s /t /u /v /w +/x /y /z /braceleft /bar /braceright /asciitilde /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /quotedblleft /quotedblright /fi +/fl /endash /emdash /bullet /dagger /daggerdbl /florin /fraction +/dotlessi /grave /acute /circumflex /tilde /macron /breve /dotaccent +/dieresis /.notdef /ring /cedilla /.notdef /hungarumlaut /ogonek /caron +/space /exclamdown /cent /sterling /currency /yen /brokenbar /section +/dieresis /copyright /ordfeminine /guillemotleft /logicalnot /hyphen /registered /macron +/degree /plusminus /twosuperior /threesuperior /acute /mu /paragraph /periodcentered +/cedilla /onesuperior /ordmasculine /guillemotright /onequarter /onehalf /threequarters /questiondown +/Agrave /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla +/Egrave /Eacute /Ecircumflex /Edieresis /Igrave /Iacute /Icircumflex /Idieresis +/Eth /Ntilde /Ograve /Oacute /Ocircumflex /Otilde /Odieresis /multiply +/Oslash /Ugrave /Uacute /Ucircumflex /Udieresis /Yacute /Thorn /germandbls +/agrave /aacute /acircumflex /atilde /adieresis /aring /ae /ccedilla +/egrave /eacute /ecircumflex /edieresis /igrave /iacute /icircumflex /idieresis +/eth /ntilde /ograve /oacute /ocircumflex /otilde /odieresis /divide +/oslash /ugrave /uacute /ucircumflex /udieresis /yacute /thorn /ydieresis +] def +%%EndResource + +%%BeginResource: procset LoutMarginNotes +% @PrependGraphic file /usr/local/lib/lout/include/dl.lpg + +% path for @Box symbol +/LoutBox +{ 0 0 moveto xsize 0 lineto + xsize ysize lineto 0 ysize lineto + closepath +} def + +% path for @CurveBox symbol +/LoutCurveBox +{ xmark 0 moveto + xsize xmark sub xmark xmark 270 360 arc + xsize xmark sub ysize xmark sub xmark 0 90 arc + xmark ysize xmark sub xmark 90 180 arc + xmark xmark xmark 180 270 arc + closepath +} def + +% path for @ShadowBox symbol +/LoutShadowBox +{ xmark 2 mul 0 moveto xsize 0 lineto + xsize ysize xmark 2 mul sub lineto + xsize xmark sub ysize xmark 2 mul sub lineto + xsize xmark sub xmark lineto + xmark 2 mul xmark lineto + closepath +} def + +% set up dictionary containing margin note data: parity LoutMargSet - +/LoutMargSet +{ /LoutMargDict 12 dict def + LoutMargDict begin + /parity exch def + /matr matrix currentmatrix def + /rightx xsize def + /lefty ysize def % highest allowable point for top of next left note + /righty ysize def % highest allowable point for top of next right note + /max { 2 copy gt { pop } { exch pop } ifelse } def + /min { 2 copy lt { pop } { exch pop } ifelse } def + end +} def + +%translate coordinate system for marginal notes: type LoutMargShift - +% where type 0 is left margin, 1 is right margin, 2 is outer, 3 is inner +/LoutMargShift +{ LoutMargDict begin + + % y coordinate of top of note, in margin coords, before vertical adjust + 0 ysize transform matr itransform exch pop + + % decide whether left or right margin based on type and parity + exch [ 0 1 parity 1 parity sub ] exch get 0 eq + { + % left margin: adjust top of note downwards if overlaps previous note + lefty min + + % bottom of note is new lefty position and also translate position + ysize sub dup /lefty exch def + + % want right edge of note at coordinate zero + xsize neg exch + } + { + % right margin: adjust top of note downwards if overlaps previous note + righty min + + % bottom of note is new righty position and also translate position + ysize sub dup /righty exch def + + % want left edge of note at coordinate rightx + rightx exch + } ifelse + + % stack now contains coord of bottom left corner in margin coordinates + matr setmatrix translate + end +} def + +% create LoutPageDict with left, right, foot, top for @Place symbol users +/LoutPageSet +{ + /LoutPageDict 5 dict def + LoutPageDict begin + /matr matrix currentmatrix def + /left 0 def + /right xsize def + /foot 0 def + /top ysize def + end + +} def + +%%EndResource + +%%EndProlog + +%%BeginSetup +%%IncludeResource: font Times-Roman +/Times-Romanfnt82 vec2 /Times-Roman LoutRecode +/fnt82 { /Times-Romanfnt82 LoutFont } def +%%IncludeResource: font Helvetica +/Helveticafnt35 vec2 /Helvetica LoutRecode +/fnt35 { /Helveticafnt35 LoutFont } def +%%EndSetup + +%%Page: 2 1 +%%BeginPageSetup +%%PageResources: font Times-Roman +%%+ font Times-Bold +%%+ font Courier +/pgsave save def +%%IncludeResource: font Times-Bold +/Times-Boldfnt84 vec2 /Times-Bold LoutRecode +/fnt84 { /Times-Boldfnt84 LoutFont } def +%%IncludeResource: font Courier +/Courierfnt29 vec2 /Courier LoutRecode +/fnt29 { /Courierfnt29 LoutFont } def +0.0500 dup scale 10 setlinewidth +%%EndPageSetup +gsave +0 0 translate +320 fnt82 0.0 0.0 0.0 setrgbcolor 11900 16840 0 0 320 384 80 LoutGraphic +gsave +LoutPageSet +grestore +gsave +0 0 translate +90.0000 rotate + +grestore + +grestore +gsave +0 0 translate +90.0000 rotate +gsave +1417 -9065 translate +320 fnt82 0.0 0.0 0.0 setrgbcolor 14006 7648 0 7648 320 384 80 LoutGraphic +gsave +0 LoutMargSet +grestore +160 fnt82 0.0 0.0 0.0 setrgbcolor 13930 7540(2)m 320 fnt84 6350 6511(Historikk)m +320 fnt82 0 5520(\213)m 640(F\370rst)s 1375(implementert)s 3155(a)s 6(v)k +3524(Guido)s 4394(v)s 8(an)k 4924(Rossum)s 6033(i)s +6193(1991.)s 0 4840(\213)m 640(Spin-of)s 8(f)k 1791(fr\345)s +2225(Amoeba,)s 3451(eit)s 3849(forskningsprosjekt)s 6305(innafor)s 7307(distrib)s 6(uerte)k +8827(system.)s 0 4160(\213)m 640(Meint)s 1482(\345)s 1704(fylle)s +2362(g)s 1(apet)k 3133(mellom)s 4187(C)s 4470(og)s +4861(bash.)s 0 3480(\213)m 640(F\370rst)s 1375(implementert)s 3155(p\345)s +3537(Macintosh.)s 0 2809(\213)m 640(Oppkalt)s 1749(etter)s 2395(Monty)s +3319(Python.)s 300 fnt29 4442 2818(spam)m 320 fnt82 5242 2809(og)m +300 fnt29 5633 2818(bacon)m 320 fnt82 6613 2809(er)m 6941(meir)s +7605(v)s 8(anle)k 4(ge)k 8661(enn)s 300 fnt29 +9199 2818(foo)m 320 fnt82 9819 2809(og)m 300 fnt29 10210 2818(bar)m +320 fnt82 10750 2809(.)m 0 2129(\213)m 640(Stammer)s 1871(fr\345)s +2305(ABC,)s 3105(eit)s 3503(programmeringsspr\345k)s 6386(utvikla)s 7352(etter)s +7998(ein)s 8464(operasjonsanalyse)s 10862(a)s 6(v)k 640 1745(programmeringsprosessen.)m +4210(ABC)s 4937(v)s 8(ar)k 5417(prim\346rt)s 6506(utvikla)s +7472(som)s 8084(undervisningsspr\345k.)s 0 1065(\213)m 640(P)s 4(\345)k 6(v)k 4(erka)k +1735(a)s 6(v)k 2104(Modula-3,)s 3507(C,)s 3863(etc.)s +0 409(\213)m 640(Finst)s 1357(tilgjengele)s 4(g)k 2930(p\345)s +3312(dei)s 3774(\210este)s 4521(plattformer)s 17(.)k +grestore + +grestore + +pgsave restore +showpage + +%%Trailer +%%DocumentNeededResources: font Courier +%%+ font Helvetica +%%+ font Helvetica-Oblique +%%+ font Symbol +%%+ font Times-Roman +%%+ font Times-Italic +%%+ font Times-Bold +%%DocumentSuppliedResources: procset LoutStartUp +%%+ procset LoutMarginNotes +%%+ encoding vec2 +%%Pages: 23 +%%EOF + +postslide + +%%Page: 2 12 +%%BeginPageSetup +save +%%EndPageSetup + +preslide +%!PS-Adobe-3.0 +%%Creator: Basser Lout Version 3.08 (May 1996) +%%CreationDate: Fri Sep 17 13:15:54 1999 +%%DocumentData: Binary +%%DocumentNeededResources: (atend) +%%DocumentSuppliedResources: (atend) +%%Pages: 1 0 +%%BoundingBox: 0 0 595 842 +%%EndComments + +%%BeginProlog +%%BeginResource: procset LoutStartUp +/m { 3 1 roll moveto show } bind def +/s { exch currentpoint exch pop moveto show } bind def +/k { exch neg 0 rmoveto show } bind def +/ul { gsave setlinewidth dup 3 1 roll + moveto lineto stroke grestore } bind def +/in { 1440 mul } def +/cm { 567 mul } def +/pt { 20 mul } def +/em { 120 mul } def +/sp { louts mul } def +/vs { loutv mul } def +/ft { loutf mul } def +/dg { } def + +/LoutGraphic { + /louts exch def + /loutv exch def + /loutf exch def + /ymark exch def + /xmark exch def + /ysize exch def + /xsize exch def +} def + +/LoutFont +{ findfont exch scalefont setfont +} bind def + +/LoutRecode { + { findfont dup length dict begin + {1 index /FID ne {def} {pop pop} ifelse} forall + /Encoding exch def + currentdict end definefont pop + } + stopped pop +} bind def + +/BeginEPSF { + /LoutEPSFState save def + /dict_count countdictstack def + /op_count count 1 sub def + userdict begin + /showpage { } def + 0 setgray 0 setlinecap + 1 setlinewidth 0 setlinejoin + 10 setmiterlimit [] 0 setdash newpath + /languagelevel where + { pop languagelevel + 1 ne + { false setstrokeadjust false setoverprint + } if + } if +} bind def + +/EndEPSF { + count op_count sub { pop } repeat + countdictstack dict_count sub { end } repeat + LoutEPSFState restore +} bind def +%%EndResource + +%%BeginResource encoding vec2 +/vec2 [ +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quoteright +/parenleft /parenright /asterisk /plus /comma /hyphen /period /slash +/zero /one /two /three /four /five /six /seven +/eight /nine /colon /semicolon /less /equal /greater /question +/at /A /B /C /D /E /F /G +/H /I /J /K /L /M /N /O +/P /Q /R /S /T /U /V /W +/X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore +/quoteleft /a /b /c /d /e /f /g +/h /i /j /k /l /m /n /o +/p /q /r /s /t /u /v /w +/x /y /z /braceleft /bar /braceright /asciitilde /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /quotedblleft /quotedblright /fi +/fl /endash /emdash /bullet /dagger /daggerdbl /florin /fraction +/dotlessi /grave /acute /circumflex /tilde /macron /breve /dotaccent +/dieresis /.notdef /ring /cedilla /.notdef /hungarumlaut /ogonek /caron +/space /exclamdown /cent /sterling /currency /yen /brokenbar /section +/dieresis /copyright /ordfeminine /guillemotleft /logicalnot /hyphen /registered /macron +/degree /plusminus /twosuperior /threesuperior /acute /mu /paragraph /periodcentered +/cedilla /onesuperior /ordmasculine /guillemotright /onequarter /onehalf /threequarters /questiondown +/Agrave /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla +/Egrave /Eacute /Ecircumflex /Edieresis /Igrave /Iacute /Icircumflex /Idieresis +/Eth /Ntilde /Ograve /Oacute /Ocircumflex /Otilde /Odieresis /multiply +/Oslash /Ugrave /Uacute /Ucircumflex /Udieresis /Yacute /Thorn /germandbls +/agrave /aacute /acircumflex /atilde /adieresis /aring /ae /ccedilla +/egrave /eacute /ecircumflex /edieresis /igrave /iacute /icircumflex /idieresis +/eth /ntilde /ograve /oacute /ocircumflex /otilde /odieresis /divide +/oslash /ugrave /uacute /ucircumflex /udieresis /yacute /thorn /ydieresis +] def +%%EndResource + +%%BeginResource: procset LoutMarginNotes +% @PrependGraphic file /usr/local/lib/lout/include/dl.lpg + +% path for @Box symbol +/LoutBox +{ 0 0 moveto xsize 0 lineto + xsize ysize lineto 0 ysize lineto + closepath +} def + +% path for @CurveBox symbol +/LoutCurveBox +{ xmark 0 moveto + xsize xmark sub xmark xmark 270 360 arc + xsize xmark sub ysize xmark sub xmark 0 90 arc + xmark ysize xmark sub xmark 90 180 arc + xmark xmark xmark 180 270 arc + closepath +} def + +% path for @ShadowBox symbol +/LoutShadowBox +{ xmark 2 mul 0 moveto xsize 0 lineto + xsize ysize xmark 2 mul sub lineto + xsize xmark sub ysize xmark 2 mul sub lineto + xsize xmark sub xmark lineto + xmark 2 mul xmark lineto + closepath +} def + +% set up dictionary containing margin note data: parity LoutMargSet - +/LoutMargSet +{ /LoutMargDict 12 dict def + LoutMargDict begin + /parity exch def + /matr matrix currentmatrix def + /rightx xsize def + /lefty ysize def % highest allowable point for top of next left note + /righty ysize def % highest allowable point for top of next right note + /max { 2 copy gt { pop } { exch pop } ifelse } def + /min { 2 copy lt { pop } { exch pop } ifelse } def + end +} def + +%translate coordinate system for marginal notes: type LoutMargShift - +% where type 0 is left margin, 1 is right margin, 2 is outer, 3 is inner +/LoutMargShift +{ LoutMargDict begin + + % y coordinate of top of note, in margin coords, before vertical adjust + 0 ysize transform matr itransform exch pop + + % decide whether left or right margin based on type and parity + exch [ 0 1 parity 1 parity sub ] exch get 0 eq + { + % left margin: adjust top of note downwards if overlaps previous note + lefty min + + % bottom of note is new lefty position and also translate position + ysize sub dup /lefty exch def + + % want right edge of note at coordinate zero + xsize neg exch + } + { + % right margin: adjust top of note downwards if overlaps previous note + righty min + + % bottom of note is new righty position and also translate position + ysize sub dup /righty exch def + + % want left edge of note at coordinate rightx + rightx exch + } ifelse + + % stack now contains coord of bottom left corner in margin coordinates + matr setmatrix translate + end +} def + +% create LoutPageDict with left, right, foot, top for @Place symbol users +/LoutPageSet +{ + /LoutPageDict 5 dict def + LoutPageDict begin + /matr matrix currentmatrix def + /left 0 def + /right xsize def + /foot 0 def + /top ysize def + end + +} def + +%%EndResource + +%%EndProlog + +%%BeginSetup +%%IncludeResource: font Times-Roman +/Times-Romanfnt82 vec2 /Times-Roman LoutRecode +/fnt82 { /Times-Romanfnt82 LoutFont } def +%%IncludeResource: font Helvetica +/Helveticafnt35 vec2 /Helvetica LoutRecode +/fnt35 { /Helveticafnt35 LoutFont } def +%%EndSetup + +%%Page: 3 1 +%%BeginPageSetup +%%PageResources: font Times-Roman +/pgsave save def +0.0500 dup scale 10 setlinewidth +%%EndPageSetup +gsave +0 0 translate +320 fnt82 0.0 0.0 0.0 setrgbcolor 11900 16840 0 0 320 384 80 LoutGraphic +gsave +LoutPageSet +grestore +gsave +0 0 translate +90.0000 rotate + +grestore + +grestore +gsave +0 0 translate +90.0000 rotate +gsave +1417 -9065 translate +320 fnt82 0.0 0.0 0.0 setrgbcolor 14006 7648 0 7648 320 384 80 LoutGraphic +gsave +1 LoutMargSet +grestore +160 fnt82 0.0 0.0 0.0 setrgbcolor 13937 7540(3)m 320 fnt82 0 6895(\213)m +640(V)s 35(ert)k 1252(i)s 1412(dag)s 1945(v)s 4(edlik)k 3(ehalde)k +3644(a)s 6(v)k 4013(Guido)s 4883(v)s 8(an)k +5413(Rossum)s 6522(med)s 7150(\210eire.)s 0 6224(\213)m 640(Grunnk)s 3(onsept:)k +1280 5553(Objektorientert.)m 3447(Alt)s 3934(er)s 4262(objekt.)s 5278(Arv)s 20(,)k +5898(inkludert)s 7130(multippel)s 8426(arv)s 20(,)k 8957(er)s +9285(st\370tta)s 10055(i)s 10215(ein)s 10681(enk)s 3(el)k +11444(modell.)s 1280 4882(Dynamisk)m 2674(typa.)s 3442(Ein)s 3961(referanse)s +5205(har)s 5693(ikkje)s 6405(b)s 6(unden)k 7417(type.)s +1280 4211(Utvidbart.)m 2721(V)s 35(eldokumentert,)k 4904(brukarv)s 4(ennle)k 4(g)k +6813(API)s 7402(til)s 7740(C.)s 0 3156(\213)m 640(Nyttige)s +1671(URLar:)s 1280 2485(http://www)m 20(.p)k 3(ython.or)k 5(g/)k +1280 1814(http://starship.p)m 3(ython.net/)k 1280 1143(http://www)m 20(.stone-dead.asn.au/)k +grestore + +grestore + +pgsave restore +showpage + +%%Trailer +%%DocumentNeededResources: font Courier +%%+ font Helvetica +%%+ font Helvetica-Oblique +%%+ font Symbol +%%+ font Times-Roman +%%+ font Times-Italic +%%+ font Times-Bold +%%DocumentSuppliedResources: procset LoutStartUp +%%+ procset LoutMarginNotes +%%+ encoding vec2 +%%Pages: 23 +%%EOF + +postslide + +preslide +%!PS-Adobe-3.0 +%%Creator: Basser Lout Version 3.08 (May 1996) +%%CreationDate: Fri Sep 17 13:15:54 1999 +%%DocumentData: Binary +%%DocumentNeededResources: (atend) +%%DocumentSuppliedResources: (atend) +%%Pages: 1 0 +%%BoundingBox: 0 0 595 842 +%%EndComments + +%%BeginProlog +%%BeginResource: procset LoutStartUp +/m { 3 1 roll moveto show } bind def +/s { exch currentpoint exch pop moveto show } bind def +/k { exch neg 0 rmoveto show } bind def +/ul { gsave setlinewidth dup 3 1 roll + moveto lineto stroke grestore } bind def +/in { 1440 mul } def +/cm { 567 mul } def +/pt { 20 mul } def +/em { 120 mul } def +/sp { louts mul } def +/vs { loutv mul } def +/ft { loutf mul } def +/dg { } def + +/LoutGraphic { + /louts exch def + /loutv exch def + /loutf exch def + /ymark exch def + /xmark exch def + /ysize exch def + /xsize exch def +} def + +/LoutFont +{ findfont exch scalefont setfont +} bind def + +/LoutRecode { + { findfont dup length dict begin + {1 index /FID ne {def} {pop pop} ifelse} forall + /Encoding exch def + currentdict end definefont pop + } + stopped pop +} bind def + +/BeginEPSF { + /LoutEPSFState save def + /dict_count countdictstack def + /op_count count 1 sub def + userdict begin + /showpage { } def + 0 setgray 0 setlinecap + 1 setlinewidth 0 setlinejoin + 10 setmiterlimit [] 0 setdash newpath + /languagelevel where + { pop languagelevel + 1 ne + { false setstrokeadjust false setoverprint + } if + } if +} bind def + +/EndEPSF { + count op_count sub { pop } repeat + countdictstack dict_count sub { end } repeat + LoutEPSFState restore +} bind def +%%EndResource + +%%BeginResource encoding vec2 +/vec2 [ +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quoteright +/parenleft /parenright /asterisk /plus /comma /hyphen /period /slash +/zero /one /two /three /four /five /six /seven +/eight /nine /colon /semicolon /less /equal /greater /question +/at /A /B /C /D /E /F /G +/H /I /J /K /L /M /N /O +/P /Q /R /S /T /U /V /W +/X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore +/quoteleft /a /b /c /d /e /f /g +/h /i /j /k /l /m /n /o +/p /q /r /s /t /u /v /w +/x /y /z /braceleft /bar /braceright /asciitilde /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /quotedblleft /quotedblright /fi +/fl /endash /emdash /bullet /dagger /daggerdbl /florin /fraction +/dotlessi /grave /acute /circumflex /tilde /macron /breve /dotaccent +/dieresis /.notdef /ring /cedilla /.notdef /hungarumlaut /ogonek /caron +/space /exclamdown /cent /sterling /currency /yen /brokenbar /section +/dieresis /copyright /ordfeminine /guillemotleft /logicalnot /hyphen /registered /macron +/degree /plusminus /twosuperior /threesuperior /acute /mu /paragraph /periodcentered +/cedilla /onesuperior /ordmasculine /guillemotright /onequarter /onehalf /threequarters /questiondown +/Agrave /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla +/Egrave /Eacute /Ecircumflex /Edieresis /Igrave /Iacute /Icircumflex /Idieresis +/Eth /Ntilde /Ograve /Oacute /Ocircumflex /Otilde /Odieresis /multiply +/Oslash /Ugrave /Uacute /Ucircumflex /Udieresis /Yacute /Thorn /germandbls +/agrave /aacute /acircumflex /atilde /adieresis /aring /ae /ccedilla +/egrave /eacute /ecircumflex /edieresis /igrave /iacute /icircumflex /idieresis +/eth /ntilde /ograve /oacute /ocircumflex /otilde /odieresis /divide +/oslash /ugrave /uacute /ucircumflex /udieresis /yacute /thorn /ydieresis +] def +%%EndResource + +%%BeginResource: procset LoutMarginNotes +% @PrependGraphic file /usr/local/lib/lout/include/dl.lpg + +% path for @Box symbol +/LoutBox +{ 0 0 moveto xsize 0 lineto + xsize ysize lineto 0 ysize lineto + closepath +} def + +% path for @CurveBox symbol +/LoutCurveBox +{ xmark 0 moveto + xsize xmark sub xmark xmark 270 360 arc + xsize xmark sub ysize xmark sub xmark 0 90 arc + xmark ysize xmark sub xmark 90 180 arc + xmark xmark xmark 180 270 arc + closepath +} def + +% path for @ShadowBox symbol +/LoutShadowBox +{ xmark 2 mul 0 moveto xsize 0 lineto + xsize ysize xmark 2 mul sub lineto + xsize xmark sub ysize xmark 2 mul sub lineto + xsize xmark sub xmark lineto + xmark 2 mul xmark lineto + closepath +} def + +% set up dictionary containing margin note data: parity LoutMargSet - +/LoutMargSet +{ /LoutMargDict 12 dict def + LoutMargDict begin + /parity exch def + /matr matrix currentmatrix def + /rightx xsize def + /lefty ysize def % highest allowable point for top of next left note + /righty ysize def % highest allowable point for top of next right note + /max { 2 copy gt { pop } { exch pop } ifelse } def + /min { 2 copy lt { pop } { exch pop } ifelse } def + end +} def + +%translate coordinate system for marginal notes: type LoutMargShift - +% where type 0 is left margin, 1 is right margin, 2 is outer, 3 is inner +/LoutMargShift +{ LoutMargDict begin + + % y coordinate of top of note, in margin coords, before vertical adjust + 0 ysize transform matr itransform exch pop + + % decide whether left or right margin based on type and parity + exch [ 0 1 parity 1 parity sub ] exch get 0 eq + { + % left margin: adjust top of note downwards if overlaps previous note + lefty min + + % bottom of note is new lefty position and also translate position + ysize sub dup /lefty exch def + + % want right edge of note at coordinate zero + xsize neg exch + } + { + % right margin: adjust top of note downwards if overlaps previous note + righty min + + % bottom of note is new righty position and also translate position + ysize sub dup /righty exch def + + % want left edge of note at coordinate rightx + rightx exch + } ifelse + + % stack now contains coord of bottom left corner in margin coordinates + matr setmatrix translate + end +} def + +% create LoutPageDict with left, right, foot, top for @Place symbol users +/LoutPageSet +{ + /LoutPageDict 5 dict def + LoutPageDict begin + /matr matrix currentmatrix def + /left 0 def + /right xsize def + /foot 0 def + /top ysize def + end + +} def + +%%EndResource + +%%EndProlog + +%%BeginSetup +%%IncludeResource: font Times-Roman +/Times-Romanfnt82 vec2 /Times-Roman LoutRecode +/fnt82 { /Times-Romanfnt82 LoutFont } def +%%IncludeResource: font Helvetica +/Helveticafnt35 vec2 /Helvetica LoutRecode +/fnt35 { /Helveticafnt35 LoutFont } def +%%EndSetup + +%%Page: 4 1 +%%BeginPageSetup +%%PageResources: font Times-Roman +%%+ font Times-Bold +%%+ font Courier +%%+ font Times-Italic +/pgsave save def +%%IncludeResource: font Times-Bold +/Times-Boldfnt84 vec2 /Times-Bold LoutRecode +/fnt84 { /Times-Boldfnt84 LoutFont } def +%%IncludeResource: font Courier +/Courierfnt29 vec2 /Courier LoutRecode +/fnt29 { /Courierfnt29 LoutFont } def +%%IncludeResource: font Times-Italic +/Times-Italicfnt83 vec2 /Times-Italic LoutRecode +/fnt83 { /Times-Italicfnt83 LoutFont } def +0.0500 dup scale 10 setlinewidth +%%EndPageSetup +gsave +0 0 translate +320 fnt82 0.0 0.0 0.0 setrgbcolor 11900 16840 0 0 320 384 80 LoutGraphic +gsave +LoutPageSet +grestore +gsave +0 0 translate +90.0000 rotate + +grestore + +grestore +gsave +0 0 translate +90.0000 rotate +gsave +1417 -9065 translate +320 fnt82 0.0 0.0 0.0 setrgbcolor 14006 7648 0 7648 320 384 80 LoutGraphic +gsave +0 LoutMargSet +grestore +160 fnt82 0.0 0.0 0.0 setrgbcolor 13930 7540(4)m 320 fnt84 4822 6511(Lister)m 29(,)k +5760(f)s 8(or)k 11(-l\370kk)k 3(er)k 7215(og)s +7610(if-setningar)s 300 fnt29 0 5865(languages)m 1800(=)s 2160(["C",)s +3240("Simula",)s 5040("BCPL",)s 6480("Intercal"])s 0 5481(OOlanguages)m 2160(=)s +2520(["Simula",)s 4500("Python",)s 6300("Eiffel"])s 0 5097(nonOOlanguages)m 2700(=)s +3060(["C",)s 4140("Fortran-IV",)s 6660("Algol-60"])s 0 4713(for)m 720(lang)s +1620(in)s 2160(languages:)s 1440 4329(if)m 1980(lang)s 2880(in)s +3420(OOlanguages:)s 2880 3945(print)m 3960(lang,)s 5040("er objektorientert.")s 1440 3561(elif)m +2340(lang)s 3240(in)s 3780(nonOOlanguages:)s 2880 3177(print)m 3960(lang,)s +5040("er ikkje objektorientert.")s 1440 2793(else:)m 2880 2409(print)m 3960(lang,)s 5040("er uklassifisert her.")s +320 fnt83 0 1903(Merk:)m 320 fnt82 640 1298(Innrykk)m 1733(mark)s 3(erer)k +2962(blokk)s 3(er)k 17(.)k 4136(Lineskift)s 5367(er)s +5695(v)s 8(anle)k 4(gvis)k 6974(signi\207kant.)s 8539(Ein)s +9058(kan)s 9596(o)s 4(v)k 4(erstyre)k 10850(lineskift)s +11974(med)s 300 fnt29 12602 1307(\\)m 320 fnt82 12782 1298(.)m +300 fnt29 640 636(for)m 320 fnt82 1260 627(itererer)m 2260(o)s 4(v)k 4(er)k +2900(ei)s 3202(liste,)s 3875(ikkje)s 4587(ein)s 5053(indeks.)s + +grestore + +grestore + +pgsave restore +showpage + +%%Trailer +%%DocumentNeededResources: font Courier +%%+ font Helvetica +%%+ font Helvetica-Oblique +%%+ font Symbol +%%+ font Times-Roman +%%+ font Times-Italic +%%+ font Times-Bold +%%DocumentSuppliedResources: procset LoutStartUp +%%+ procset LoutMarginNotes +%%+ encoding vec2 +%%Pages: 23 +%%EOF + +postslide + +%%Page: 3 12 +%%BeginPageSetup +save +%%EndPageSetup + +preslide +%!PS-Adobe-3.0 +%%Creator: Basser Lout Version 3.08 (May 1996) +%%CreationDate: Fri Sep 17 13:15:54 1999 +%%DocumentData: Binary +%%DocumentNeededResources: (atend) +%%DocumentSuppliedResources: (atend) +%%Pages: 1 0 +%%BoundingBox: 0 0 595 842 +%%EndComments + +%%BeginProlog +%%BeginResource: procset LoutStartUp +/m { 3 1 roll moveto show } bind def +/s { exch currentpoint exch pop moveto show } bind def +/k { exch neg 0 rmoveto show } bind def +/ul { gsave setlinewidth dup 3 1 roll + moveto lineto stroke grestore } bind def +/in { 1440 mul } def +/cm { 567 mul } def +/pt { 20 mul } def +/em { 120 mul } def +/sp { louts mul } def +/vs { loutv mul } def +/ft { loutf mul } def +/dg { } def + +/LoutGraphic { + /louts exch def + /loutv exch def + /loutf exch def + /ymark exch def + /xmark exch def + /ysize exch def + /xsize exch def +} def + +/LoutFont +{ findfont exch scalefont setfont +} bind def + +/LoutRecode { + { findfont dup length dict begin + {1 index /FID ne {def} {pop pop} ifelse} forall + /Encoding exch def + currentdict end definefont pop + } + stopped pop +} bind def + +/BeginEPSF { + /LoutEPSFState save def + /dict_count countdictstack def + /op_count count 1 sub def + userdict begin + /showpage { } def + 0 setgray 0 setlinecap + 1 setlinewidth 0 setlinejoin + 10 setmiterlimit [] 0 setdash newpath + /languagelevel where + { pop languagelevel + 1 ne + { false setstrokeadjust false setoverprint + } if + } if +} bind def + +/EndEPSF { + count op_count sub { pop } repeat + countdictstack dict_count sub { end } repeat + LoutEPSFState restore +} bind def +%%EndResource + +%%BeginResource encoding vec2 +/vec2 [ +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quoteright +/parenleft /parenright /asterisk /plus /comma /hyphen /period /slash +/zero /one /two /three /four /five /six /seven +/eight /nine /colon /semicolon /less /equal /greater /question +/at /A /B /C /D /E /F /G +/H /I /J /K /L /M /N /O +/P /Q /R /S /T /U /V /W +/X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore +/quoteleft /a /b /c /d /e /f /g +/h /i /j /k /l /m /n /o +/p /q /r /s /t /u /v /w +/x /y /z /braceleft /bar /braceright /asciitilde /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /quotedblleft /quotedblright /fi +/fl /endash /emdash /bullet /dagger /daggerdbl /florin /fraction +/dotlessi /grave /acute /circumflex /tilde /macron /breve /dotaccent +/dieresis /.notdef /ring /cedilla /.notdef /hungarumlaut /ogonek /caron +/space /exclamdown /cent /sterling /currency /yen /brokenbar /section +/dieresis /copyright /ordfeminine /guillemotleft /logicalnot /hyphen /registered /macron +/degree /plusminus /twosuperior /threesuperior /acute /mu /paragraph /periodcentered +/cedilla /onesuperior /ordmasculine /guillemotright /onequarter /onehalf /threequarters /questiondown +/Agrave /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla +/Egrave /Eacute /Ecircumflex /Edieresis /Igrave /Iacute /Icircumflex /Idieresis +/Eth /Ntilde /Ograve /Oacute /Ocircumflex /Otilde /Odieresis /multiply +/Oslash /Ugrave /Uacute /Ucircumflex /Udieresis /Yacute /Thorn /germandbls +/agrave /aacute /acircumflex /atilde /adieresis /aring /ae /ccedilla +/egrave /eacute /ecircumflex /edieresis /igrave /iacute /icircumflex /idieresis +/eth /ntilde /ograve /oacute /ocircumflex /otilde /odieresis /divide +/oslash /ugrave /uacute /ucircumflex /udieresis /yacute /thorn /ydieresis +] def +%%EndResource + +%%BeginResource: procset LoutMarginNotes +% @PrependGraphic file /usr/local/lib/lout/include/dl.lpg + +% path for @Box symbol +/LoutBox +{ 0 0 moveto xsize 0 lineto + xsize ysize lineto 0 ysize lineto + closepath +} def + +% path for @CurveBox symbol +/LoutCurveBox +{ xmark 0 moveto + xsize xmark sub xmark xmark 270 360 arc + xsize xmark sub ysize xmark sub xmark 0 90 arc + xmark ysize xmark sub xmark 90 180 arc + xmark xmark xmark 180 270 arc + closepath +} def + +% path for @ShadowBox symbol +/LoutShadowBox +{ xmark 2 mul 0 moveto xsize 0 lineto + xsize ysize xmark 2 mul sub lineto + xsize xmark sub ysize xmark 2 mul sub lineto + xsize xmark sub xmark lineto + xmark 2 mul xmark lineto + closepath +} def + +% set up dictionary containing margin note data: parity LoutMargSet - +/LoutMargSet +{ /LoutMargDict 12 dict def + LoutMargDict begin + /parity exch def + /matr matrix currentmatrix def + /rightx xsize def + /lefty ysize def % highest allowable point for top of next left note + /righty ysize def % highest allowable point for top of next right note + /max { 2 copy gt { pop } { exch pop } ifelse } def + /min { 2 copy lt { pop } { exch pop } ifelse } def + end +} def + +%translate coordinate system for marginal notes: type LoutMargShift - +% where type 0 is left margin, 1 is right margin, 2 is outer, 3 is inner +/LoutMargShift +{ LoutMargDict begin + + % y coordinate of top of note, in margin coords, before vertical adjust + 0 ysize transform matr itransform exch pop + + % decide whether left or right margin based on type and parity + exch [ 0 1 parity 1 parity sub ] exch get 0 eq + { + % left margin: adjust top of note downwards if overlaps previous note + lefty min + + % bottom of note is new lefty position and also translate position + ysize sub dup /lefty exch def + + % want right edge of note at coordinate zero + xsize neg exch + } + { + % right margin: adjust top of note downwards if overlaps previous note + righty min + + % bottom of note is new righty position and also translate position + ysize sub dup /righty exch def + + % want left edge of note at coordinate rightx + rightx exch + } ifelse + + % stack now contains coord of bottom left corner in margin coordinates + matr setmatrix translate + end +} def + +% create LoutPageDict with left, right, foot, top for @Place symbol users +/LoutPageSet +{ + /LoutPageDict 5 dict def + LoutPageDict begin + /matr matrix currentmatrix def + /left 0 def + /right xsize def + /foot 0 def + /top ysize def + end + +} def + +%%EndResource + +%%EndProlog + +%%BeginSetup +%%IncludeResource: font Times-Roman +/Times-Romanfnt82 vec2 /Times-Roman LoutRecode +/fnt82 { /Times-Romanfnt82 LoutFont } def +%%IncludeResource: font Helvetica +/Helveticafnt35 vec2 /Helvetica LoutRecode +/fnt35 { /Helveticafnt35 LoutFont } def +%%EndSetup + +%%Page: 5 1 +%%BeginPageSetup +%%PageResources: font Times-Roman +%%+ font Courier +/pgsave save def +%%IncludeResource: font Courier +/Courierfnt29 vec2 /Courier LoutRecode +/fnt29 { /Courierfnt29 LoutFont } def +0.0500 dup scale 10 setlinewidth +%%EndPageSetup +gsave +0 0 translate +320 fnt82 0.0 0.0 0.0 setrgbcolor 11900 16840 0 0 320 384 80 LoutGraphic +gsave +LoutPageSet +grestore +gsave +0 0 translate +90.0000 rotate + +grestore + +grestore +gsave +0 0 translate +90.0000 rotate +gsave +1417 -9065 translate +320 fnt82 0.0 0.0 0.0 setrgbcolor 14006 7648 0 7648 320 384 80 LoutGraphic +gsave +1 LoutMargSet +grestore +160 fnt82 0.0 0.0 0.0 setrgbcolor 13935 7538(5)m 300 fnt29 640 6902(case)m +320 fnt82 1360 6893(,)m 1503(som)s 2115(i)s 2275(td)s +2601(C,)s 2957(\207nst)s 3586(ikkje)s 4298(i)s 4458(Python.)s +640 6222(Ein)m 1159(kan)s 1697(slette)s 2443(referansar)s 3799(med)s +300 fnt29 4427 6231(del)m 320 fnt82 4967 6222(.)m +grestore + +grestore + +pgsave restore +showpage + +%%Trailer +%%DocumentNeededResources: font Courier +%%+ font Helvetica +%%+ font Helvetica-Oblique +%%+ font Symbol +%%+ font Times-Roman +%%+ font Times-Italic +%%+ font Times-Bold +%%DocumentSuppliedResources: procset LoutStartUp +%%+ procset LoutMarginNotes +%%+ encoding vec2 +%%Pages: 23 +%%EOF + +postslide + +preslide +%!PS-Adobe-3.0 +%%Creator: Basser Lout Version 3.08 (May 1996) +%%CreationDate: Fri Sep 17 13:15:54 1999 +%%DocumentData: Binary +%%DocumentNeededResources: (atend) +%%DocumentSuppliedResources: (atend) +%%Pages: 1 0 +%%BoundingBox: 0 0 595 842 +%%EndComments + +%%BeginProlog +%%BeginResource: procset LoutStartUp +/m { 3 1 roll moveto show } bind def +/s { exch currentpoint exch pop moveto show } bind def +/k { exch neg 0 rmoveto show } bind def +/ul { gsave setlinewidth dup 3 1 roll + moveto lineto stroke grestore } bind def +/in { 1440 mul } def +/cm { 567 mul } def +/pt { 20 mul } def +/em { 120 mul } def +/sp { louts mul } def +/vs { loutv mul } def +/ft { loutf mul } def +/dg { } def + +/LoutGraphic { + /louts exch def + /loutv exch def + /loutf exch def + /ymark exch def + /xmark exch def + /ysize exch def + /xsize exch def +} def + +/LoutFont +{ findfont exch scalefont setfont +} bind def + +/LoutRecode { + { findfont dup length dict begin + {1 index /FID ne {def} {pop pop} ifelse} forall + /Encoding exch def + currentdict end definefont pop + } + stopped pop +} bind def + +/BeginEPSF { + /LoutEPSFState save def + /dict_count countdictstack def + /op_count count 1 sub def + userdict begin + /showpage { } def + 0 setgray 0 setlinecap + 1 setlinewidth 0 setlinejoin + 10 setmiterlimit [] 0 setdash newpath + /languagelevel where + { pop languagelevel + 1 ne + { false setstrokeadjust false setoverprint + } if + } if +} bind def + +/EndEPSF { + count op_count sub { pop } repeat + countdictstack dict_count sub { end } repeat + LoutEPSFState restore +} bind def +%%EndResource + +%%BeginResource encoding vec2 +/vec2 [ +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quoteright +/parenleft /parenright /asterisk /plus /comma /hyphen /period /slash +/zero /one /two /three /four /five /six /seven +/eight /nine /colon /semicolon /less /equal /greater /question +/at /A /B /C /D /E /F /G +/H /I /J /K /L /M /N /O +/P /Q /R /S /T /U /V /W +/X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore +/quoteleft /a /b /c /d /e /f /g +/h /i /j /k /l /m /n /o +/p /q /r /s /t /u /v /w +/x /y /z /braceleft /bar /braceright /asciitilde /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /quotedblleft /quotedblright /fi +/fl /endash /emdash /bullet /dagger /daggerdbl /florin /fraction +/dotlessi /grave /acute /circumflex /tilde /macron /breve /dotaccent +/dieresis /.notdef /ring /cedilla /.notdef /hungarumlaut /ogonek /caron +/space /exclamdown /cent /sterling /currency /yen /brokenbar /section +/dieresis /copyright /ordfeminine /guillemotleft /logicalnot /hyphen /registered /macron +/degree /plusminus /twosuperior /threesuperior /acute /mu /paragraph /periodcentered +/cedilla /onesuperior /ordmasculine /guillemotright /onequarter /onehalf /threequarters /questiondown +/Agrave /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla +/Egrave /Eacute /Ecircumflex /Edieresis /Igrave /Iacute /Icircumflex /Idieresis +/Eth /Ntilde /Ograve /Oacute /Ocircumflex /Otilde /Odieresis /multiply +/Oslash /Ugrave /Uacute /Ucircumflex /Udieresis /Yacute /Thorn /germandbls +/agrave /aacute /acircumflex /atilde /adieresis /aring /ae /ccedilla +/egrave /eacute /ecircumflex /edieresis /igrave /iacute /icircumflex /idieresis +/eth /ntilde /ograve /oacute /ocircumflex /otilde /odieresis /divide +/oslash /ugrave /uacute /ucircumflex /udieresis /yacute /thorn /ydieresis +] def +%%EndResource + +%%BeginResource: procset LoutMarginNotes +% @PrependGraphic file /usr/local/lib/lout/include/dl.lpg + +% path for @Box symbol +/LoutBox +{ 0 0 moveto xsize 0 lineto + xsize ysize lineto 0 ysize lineto + closepath +} def + +% path for @CurveBox symbol +/LoutCurveBox +{ xmark 0 moveto + xsize xmark sub xmark xmark 270 360 arc + xsize xmark sub ysize xmark sub xmark 0 90 arc + xmark ysize xmark sub xmark 90 180 arc + xmark xmark xmark 180 270 arc + closepath +} def + +% path for @ShadowBox symbol +/LoutShadowBox +{ xmark 2 mul 0 moveto xsize 0 lineto + xsize ysize xmark 2 mul sub lineto + xsize xmark sub ysize xmark 2 mul sub lineto + xsize xmark sub xmark lineto + xmark 2 mul xmark lineto + closepath +} def + +% set up dictionary containing margin note data: parity LoutMargSet - +/LoutMargSet +{ /LoutMargDict 12 dict def + LoutMargDict begin + /parity exch def + /matr matrix currentmatrix def + /rightx xsize def + /lefty ysize def % highest allowable point for top of next left note + /righty ysize def % highest allowable point for top of next right note + /max { 2 copy gt { pop } { exch pop } ifelse } def + /min { 2 copy lt { pop } { exch pop } ifelse } def + end +} def + +%translate coordinate system for marginal notes: type LoutMargShift - +% where type 0 is left margin, 1 is right margin, 2 is outer, 3 is inner +/LoutMargShift +{ LoutMargDict begin + + % y coordinate of top of note, in margin coords, before vertical adjust + 0 ysize transform matr itransform exch pop + + % decide whether left or right margin based on type and parity + exch [ 0 1 parity 1 parity sub ] exch get 0 eq + { + % left margin: adjust top of note downwards if overlaps previous note + lefty min + + % bottom of note is new lefty position and also translate position + ysize sub dup /lefty exch def + + % want right edge of note at coordinate zero + xsize neg exch + } + { + % right margin: adjust top of note downwards if overlaps previous note + righty min + + % bottom of note is new righty position and also translate position + ysize sub dup /righty exch def + + % want left edge of note at coordinate rightx + rightx exch + } ifelse + + % stack now contains coord of bottom left corner in margin coordinates + matr setmatrix translate + end +} def + +% create LoutPageDict with left, right, foot, top for @Place symbol users +/LoutPageSet +{ + /LoutPageDict 5 dict def + LoutPageDict begin + /matr matrix currentmatrix def + /left 0 def + /right xsize def + /foot 0 def + /top ysize def + end + +} def + +%%EndResource + +%%EndProlog + +%%BeginSetup +%%IncludeResource: font Times-Roman +/Times-Romanfnt82 vec2 /Times-Roman LoutRecode +/fnt82 { /Times-Romanfnt82 LoutFont } def +%%IncludeResource: font Helvetica +/Helveticafnt35 vec2 /Helvetica LoutRecode +/fnt35 { /Helveticafnt35 LoutFont } def +%%EndSetup + +%%Page: 6 1 +%%BeginPageSetup +%%PageResources: font Times-Roman +%%+ font Times-Bold +%%+ font Courier +/pgsave save def +%%IncludeResource: font Times-Bold +/Times-Boldfnt84 vec2 /Times-Bold LoutRecode +/fnt84 { /Times-Boldfnt84 LoutFont } def +%%IncludeResource: font Courier +/Courierfnt29 vec2 /Courier LoutRecode +/fnt29 { /Courierfnt29 LoutFont } def +0.0500 dup scale 10 setlinewidth +%%EndPageSetup +gsave +0 0 translate +320 fnt82 0.0 0.0 0.0 setrgbcolor 11900 16840 0 0 320 384 80 LoutGraphic +gsave +LoutPageSet +grestore +gsave +0 0 translate +90.0000 rotate + +grestore + +grestore +gsave +0 0 translate +90.0000 rotate +gsave +1417 -9065 translate +320 fnt82 0.0 0.0 0.0 setrgbcolor 14006 7648 0 7648 320 384 80 LoutGraphic +gsave +0 LoutMargSet +grestore +160 fnt82 0.0 0.0 0.0 setrgbcolor 13931 7539(6)m 320 fnt84 4540 6508(Dictionaries,)m +6340(while)s 7141(og)s 7536(k)s 4(ommentarar)k 32(.)k +300 fnt29 0 5862(langdict)m 1620(=)s 1980({)s 1440 5478("Python":)m +3240("Kjekt programmeringsspr\345k.",)s 1440 5094("Rexx":)m 2880("Skripting p\345 Amiga og stormaskiner fr\345 IBM.",)s 1440 4710("Perl":)m 2880("Programmeringsspr\345k oppfunne av ein SIL-lingvist.")s +0 4326(})m 0 3942(aksess)m 1260(=)s 1620(0)s 0 3558(while)m +1080(aksess)s 2340(<)s 2700(3:)s 1440 3174(aksess)m 2700(=)s +3060(aksess)s 4320(+)s 4680(1)s 1440 2790(oppslag)m 2880(=)s +3240(raw_input\(\))s 1440 2406(if)m 1980(oppslag)s 3420(==)s 3960("avslutt":)s +2880 2022(break)m 1440 1638(elif)m 2340(oppslag)s 3780(==)s 4320("Intercal":)s +6480(#)s 6840(Vi)s 7380(overser)s 8820(at)s 9360(folk)s +10260(vil)s 10980(l\346re)s 11880(om)s 12420(Intercal)s 2880 1254(continue)m +1440 870(if)m 1980(langdict.has_key\(oppslag\):)s 2880 486(print)m 3960(langdict[oppslag])s 1440 102(else:)m + +grestore + +grestore + +pgsave restore +showpage + +%%Trailer +%%DocumentNeededResources: font Courier +%%+ font Helvetica +%%+ font Helvetica-Oblique +%%+ font Symbol +%%+ font Times-Roman +%%+ font Times-Italic +%%+ font Times-Bold +%%DocumentSuppliedResources: procset LoutStartUp +%%+ procset LoutMarginNotes +%%+ encoding vec2 +%%Pages: 23 +%%EOF + +postslide + +%%Page: 4 12 +%%BeginPageSetup +save +%%EndPageSetup + +preslide +%!PS-Adobe-3.0 +%%Creator: Basser Lout Version 3.08 (May 1996) +%%CreationDate: Fri Sep 17 13:15:54 1999 +%%DocumentData: Binary +%%DocumentNeededResources: (atend) +%%DocumentSuppliedResources: (atend) +%%Pages: 1 0 +%%BoundingBox: 0 0 595 842 +%%EndComments + +%%BeginProlog +%%BeginResource: procset LoutStartUp +/m { 3 1 roll moveto show } bind def +/s { exch currentpoint exch pop moveto show } bind def +/k { exch neg 0 rmoveto show } bind def +/ul { gsave setlinewidth dup 3 1 roll + moveto lineto stroke grestore } bind def +/in { 1440 mul } def +/cm { 567 mul } def +/pt { 20 mul } def +/em { 120 mul } def +/sp { louts mul } def +/vs { loutv mul } def +/ft { loutf mul } def +/dg { } def + +/LoutGraphic { + /louts exch def + /loutv exch def + /loutf exch def + /ymark exch def + /xmark exch def + /ysize exch def + /xsize exch def +} def + +/LoutFont +{ findfont exch scalefont setfont +} bind def + +/LoutRecode { + { findfont dup length dict begin + {1 index /FID ne {def} {pop pop} ifelse} forall + /Encoding exch def + currentdict end definefont pop + } + stopped pop +} bind def + +/BeginEPSF { + /LoutEPSFState save def + /dict_count countdictstack def + /op_count count 1 sub def + userdict begin + /showpage { } def + 0 setgray 0 setlinecap + 1 setlinewidth 0 setlinejoin + 10 setmiterlimit [] 0 setdash newpath + /languagelevel where + { pop languagelevel + 1 ne + { false setstrokeadjust false setoverprint + } if + } if +} bind def + +/EndEPSF { + count op_count sub { pop } repeat + countdictstack dict_count sub { end } repeat + LoutEPSFState restore +} bind def +%%EndResource + +%%BeginResource encoding vec2 +/vec2 [ +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quoteright +/parenleft /parenright /asterisk /plus /comma /hyphen /period /slash +/zero /one /two /three /four /five /six /seven +/eight /nine /colon /semicolon /less /equal /greater /question +/at /A /B /C /D /E /F /G +/H /I /J /K /L /M /N /O +/P /Q /R /S /T /U /V /W +/X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore +/quoteleft /a /b /c /d /e /f /g +/h /i /j /k /l /m /n /o +/p /q /r /s /t /u /v /w +/x /y /z /braceleft /bar /braceright /asciitilde /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /quotedblleft /quotedblright /fi +/fl /endash /emdash /bullet /dagger /daggerdbl /florin /fraction +/dotlessi /grave /acute /circumflex /tilde /macron /breve /dotaccent +/dieresis /.notdef /ring /cedilla /.notdef /hungarumlaut /ogonek /caron +/space /exclamdown /cent /sterling /currency /yen /brokenbar /section +/dieresis /copyright /ordfeminine /guillemotleft /logicalnot /hyphen /registered /macron +/degree /plusminus /twosuperior /threesuperior /acute /mu /paragraph /periodcentered +/cedilla /onesuperior /ordmasculine /guillemotright /onequarter /onehalf /threequarters /questiondown +/Agrave /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla +/Egrave /Eacute /Ecircumflex /Edieresis /Igrave /Iacute /Icircumflex /Idieresis +/Eth /Ntilde /Ograve /Oacute /Ocircumflex /Otilde /Odieresis /multiply +/Oslash /Ugrave /Uacute /Ucircumflex /Udieresis /Yacute /Thorn /germandbls +/agrave /aacute /acircumflex /atilde /adieresis /aring /ae /ccedilla +/egrave /eacute /ecircumflex /edieresis /igrave /iacute /icircumflex /idieresis +/eth /ntilde /ograve /oacute /ocircumflex /otilde /odieresis /divide +/oslash /ugrave /uacute /ucircumflex /udieresis /yacute /thorn /ydieresis +] def +%%EndResource + +%%BeginResource: procset LoutMarginNotes +% @PrependGraphic file /usr/local/lib/lout/include/dl.lpg + +% path for @Box symbol +/LoutBox +{ 0 0 moveto xsize 0 lineto + xsize ysize lineto 0 ysize lineto + closepath +} def + +% path for @CurveBox symbol +/LoutCurveBox +{ xmark 0 moveto + xsize xmark sub xmark xmark 270 360 arc + xsize xmark sub ysize xmark sub xmark 0 90 arc + xmark ysize xmark sub xmark 90 180 arc + xmark xmark xmark 180 270 arc + closepath +} def + +% path for @ShadowBox symbol +/LoutShadowBox +{ xmark 2 mul 0 moveto xsize 0 lineto + xsize ysize xmark 2 mul sub lineto + xsize xmark sub ysize xmark 2 mul sub lineto + xsize xmark sub xmark lineto + xmark 2 mul xmark lineto + closepath +} def + +% set up dictionary containing margin note data: parity LoutMargSet - +/LoutMargSet +{ /LoutMargDict 12 dict def + LoutMargDict begin + /parity exch def + /matr matrix currentmatrix def + /rightx xsize def + /lefty ysize def % highest allowable point for top of next left note + /righty ysize def % highest allowable point for top of next right note + /max { 2 copy gt { pop } { exch pop } ifelse } def + /min { 2 copy lt { pop } { exch pop } ifelse } def + end +} def + +%translate coordinate system for marginal notes: type LoutMargShift - +% where type 0 is left margin, 1 is right margin, 2 is outer, 3 is inner +/LoutMargShift +{ LoutMargDict begin + + % y coordinate of top of note, in margin coords, before vertical adjust + 0 ysize transform matr itransform exch pop + + % decide whether left or right margin based on type and parity + exch [ 0 1 parity 1 parity sub ] exch get 0 eq + { + % left margin: adjust top of note downwards if overlaps previous note + lefty min + + % bottom of note is new lefty position and also translate position + ysize sub dup /lefty exch def + + % want right edge of note at coordinate zero + xsize neg exch + } + { + % right margin: adjust top of note downwards if overlaps previous note + righty min + + % bottom of note is new righty position and also translate position + ysize sub dup /righty exch def + + % want left edge of note at coordinate rightx + rightx exch + } ifelse + + % stack now contains coord of bottom left corner in margin coordinates + matr setmatrix translate + end +} def + +% create LoutPageDict with left, right, foot, top for @Place symbol users +/LoutPageSet +{ + /LoutPageDict 5 dict def + LoutPageDict begin + /matr matrix currentmatrix def + /left 0 def + /right xsize def + /foot 0 def + /top ysize def + end + +} def + +%%EndResource + +%%EndProlog + +%%BeginSetup +%%IncludeResource: font Times-Roman +/Times-Romanfnt82 vec2 /Times-Roman LoutRecode +/fnt82 { /Times-Romanfnt82 LoutFont } def +%%IncludeResource: font Helvetica +/Helveticafnt35 vec2 /Helvetica LoutRecode +/fnt35 { /Helveticafnt35 LoutFont } def +%%EndSetup + +%%Page: 7 1 +%%BeginPageSetup +%%PageResources: font Times-Roman +%%+ font Courier +%%+ font Times-Italic +/pgsave save def +%%IncludeResource: font Courier +/Courierfnt29 vec2 /Courier LoutRecode +/fnt29 { /Courierfnt29 LoutFont } def +%%IncludeResource: font Times-Italic +/Times-Italicfnt83 vec2 /Times-Italic LoutRecode +/fnt83 { /Times-Italicfnt83 LoutFont } def +0.0500 dup scale 10 setlinewidth +%%EndPageSetup +gsave +0 0 translate +320 fnt82 0.0 0.0 0.0 setrgbcolor 11900 16840 0 0 320 384 80 LoutGraphic +gsave +LoutPageSet +grestore +gsave +0 0 translate +90.0000 rotate + +grestore + +grestore +gsave +0 0 translate +90.0000 rotate +gsave +1417 -9065 translate +320 fnt82 0.0 0.0 0.0 setrgbcolor 14006 7648 0 7648 320 384 80 LoutGraphic +gsave +1 LoutMargSet +grestore +160 fnt82 0.0 0.0 0.0 setrgbcolor 13934 7543(7)m 300 fnt29 2880 6921(print)m +3960("Ukjent spr\345k.")s 0 6537(else:)m 1440 6153(print)m 2520("Ein f\345r maksimalt gjera tre oppslag i ordlista.")s 320 fnt83 +0 5647(Merk:)m 300 fnt29 640 5051(for)m 320 fnt82 1260 5042(og)m +300 fnt29 1651 5051(while)m 320 fnt82 2631 5042(kan)m 3169(be)s 4(gge)k +4003(ha)s 4385(ein)s 300 fnt29 4851 5051(else)m 320 fnt82 +5651 5042(som)m 6263(v)s 4(ert)k 6835(eksekv)s 4(ert)k +8135(om)s 8623(l\370kka)s 9413(ikkje)s 10125(v)s 4(ert)k +10697(a)s 6(vbrote)k 11723(vha)s 300 fnt29 12265 5051(break)m +320 fnt82 13165 5042(.)m 640 4371(Python)m 1621(har)s 2109(ikkje)s +2821(k)s 3(ortformer)k 4280(a)s 6(v)k 4649(typen)s +300 fnt29 5435 4380(i++)m 320 fnt82 5975 4371(.)m 640 3700(Liner)m +1411(har)s 1899(implisitt)s 3039(k)s 3(ontinuasjon)k 4762(om)s +5250(ein)s 300 fnt29 5716 3709({)m 320 fnt82 5896 3700(,)m +300 fnt29 6039 3709(\()m 320 fnt82 6299 3700(eller)m 300 fnt29 +6945 3709([)m 320 fnt82 7205 3700(enno)m 7898(ikkje)s 8610(har)s +9098(v)s 6(orte)k 9822(lukka.)s 640 3029(Alle)m 1263(hashbare,)s +2542(eller)s 3188(statisk)s 3(e,)k 4284(objekt)s 5162(kan)s +5700(n)s 4(yttast)k 6626(som)s 7238(n\370kler)s 8134(i)s +8294(dictionaries.)s 300 fnt29 640 2367(#)m 320 fnt82 900 2358(er)m +1228(k)s 3(ommentarmark\370r)k 17(.)k +grestore + +grestore + +pgsave restore +showpage + +%%Trailer +%%DocumentNeededResources: font Courier +%%+ font Helvetica +%%+ font Helvetica-Oblique +%%+ font Symbol +%%+ font Times-Roman +%%+ font Times-Italic +%%+ font Times-Bold +%%DocumentSuppliedResources: procset LoutStartUp +%%+ procset LoutMarginNotes +%%+ encoding vec2 +%%Pages: 23 +%%EOF + +postslide + +preslide +%!PS-Adobe-3.0 +%%Creator: Basser Lout Version 3.08 (May 1996) +%%CreationDate: Fri Sep 17 13:15:54 1999 +%%DocumentData: Binary +%%DocumentNeededResources: (atend) +%%DocumentSuppliedResources: (atend) +%%Pages: 1 0 +%%BoundingBox: 0 0 595 842 +%%EndComments + +%%BeginProlog +%%BeginResource: procset LoutStartUp +/m { 3 1 roll moveto show } bind def +/s { exch currentpoint exch pop moveto show } bind def +/k { exch neg 0 rmoveto show } bind def +/ul { gsave setlinewidth dup 3 1 roll + moveto lineto stroke grestore } bind def +/in { 1440 mul } def +/cm { 567 mul } def +/pt { 20 mul } def +/em { 120 mul } def +/sp { louts mul } def +/vs { loutv mul } def +/ft { loutf mul } def +/dg { } def + +/LoutGraphic { + /louts exch def + /loutv exch def + /loutf exch def + /ymark exch def + /xmark exch def + /ysize exch def + /xsize exch def +} def + +/LoutFont +{ findfont exch scalefont setfont +} bind def + +/LoutRecode { + { findfont dup length dict begin + {1 index /FID ne {def} {pop pop} ifelse} forall + /Encoding exch def + currentdict end definefont pop + } + stopped pop +} bind def + +/BeginEPSF { + /LoutEPSFState save def + /dict_count countdictstack def + /op_count count 1 sub def + userdict begin + /showpage { } def + 0 setgray 0 setlinecap + 1 setlinewidth 0 setlinejoin + 10 setmiterlimit [] 0 setdash newpath + /languagelevel where + { pop languagelevel + 1 ne + { false setstrokeadjust false setoverprint + } if + } if +} bind def + +/EndEPSF { + count op_count sub { pop } repeat + countdictstack dict_count sub { end } repeat + LoutEPSFState restore +} bind def +%%EndResource + +%%BeginResource encoding vec2 +/vec2 [ +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quoteright +/parenleft /parenright /asterisk /plus /comma /hyphen /period /slash +/zero /one /two /three /four /five /six /seven +/eight /nine /colon /semicolon /less /equal /greater /question +/at /A /B /C /D /E /F /G +/H /I /J /K /L /M /N /O +/P /Q /R /S /T /U /V /W +/X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore +/quoteleft /a /b /c /d /e /f /g +/h /i /j /k /l /m /n /o +/p /q /r /s /t /u /v /w +/x /y /z /braceleft /bar /braceright /asciitilde /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /quotedblleft /quotedblright /fi +/fl /endash /emdash /bullet /dagger /daggerdbl /florin /fraction +/dotlessi /grave /acute /circumflex /tilde /macron /breve /dotaccent +/dieresis /.notdef /ring /cedilla /.notdef /hungarumlaut /ogonek /caron +/space /exclamdown /cent /sterling /currency /yen /brokenbar /section +/dieresis /copyright /ordfeminine /guillemotleft /logicalnot /hyphen /registered /macron +/degree /plusminus /twosuperior /threesuperior /acute /mu /paragraph /periodcentered +/cedilla /onesuperior /ordmasculine /guillemotright /onequarter /onehalf /threequarters /questiondown +/Agrave /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla +/Egrave /Eacute /Ecircumflex /Edieresis /Igrave /Iacute /Icircumflex /Idieresis +/Eth /Ntilde /Ograve /Oacute /Ocircumflex /Otilde /Odieresis /multiply +/Oslash /Ugrave /Uacute /Ucircumflex /Udieresis /Yacute /Thorn /germandbls +/agrave /aacute /acircumflex /atilde /adieresis /aring /ae /ccedilla +/egrave /eacute /ecircumflex /edieresis /igrave /iacute /icircumflex /idieresis +/eth /ntilde /ograve /oacute /ocircumflex /otilde /odieresis /divide +/oslash /ugrave /uacute /ucircumflex /udieresis /yacute /thorn /ydieresis +] def +%%EndResource + +%%BeginResource: procset LoutMarginNotes +% @PrependGraphic file /usr/local/lib/lout/include/dl.lpg + +% path for @Box symbol +/LoutBox +{ 0 0 moveto xsize 0 lineto + xsize ysize lineto 0 ysize lineto + closepath +} def + +% path for @CurveBox symbol +/LoutCurveBox +{ xmark 0 moveto + xsize xmark sub xmark xmark 270 360 arc + xsize xmark sub ysize xmark sub xmark 0 90 arc + xmark ysize xmark sub xmark 90 180 arc + xmark xmark xmark 180 270 arc + closepath +} def + +% path for @ShadowBox symbol +/LoutShadowBox +{ xmark 2 mul 0 moveto xsize 0 lineto + xsize ysize xmark 2 mul sub lineto + xsize xmark sub ysize xmark 2 mul sub lineto + xsize xmark sub xmark lineto + xmark 2 mul xmark lineto + closepath +} def + +% set up dictionary containing margin note data: parity LoutMargSet - +/LoutMargSet +{ /LoutMargDict 12 dict def + LoutMargDict begin + /parity exch def + /matr matrix currentmatrix def + /rightx xsize def + /lefty ysize def % highest allowable point for top of next left note + /righty ysize def % highest allowable point for top of next right note + /max { 2 copy gt { pop } { exch pop } ifelse } def + /min { 2 copy lt { pop } { exch pop } ifelse } def + end +} def + +%translate coordinate system for marginal notes: type LoutMargShift - +% where type 0 is left margin, 1 is right margin, 2 is outer, 3 is inner +/LoutMargShift +{ LoutMargDict begin + + % y coordinate of top of note, in margin coords, before vertical adjust + 0 ysize transform matr itransform exch pop + + % decide whether left or right margin based on type and parity + exch [ 0 1 parity 1 parity sub ] exch get 0 eq + { + % left margin: adjust top of note downwards if overlaps previous note + lefty min + + % bottom of note is new lefty position and also translate position + ysize sub dup /lefty exch def + + % want right edge of note at coordinate zero + xsize neg exch + } + { + % right margin: adjust top of note downwards if overlaps previous note + righty min + + % bottom of note is new righty position and also translate position + ysize sub dup /righty exch def + + % want left edge of note at coordinate rightx + rightx exch + } ifelse + + % stack now contains coord of bottom left corner in margin coordinates + matr setmatrix translate + end +} def + +% create LoutPageDict with left, right, foot, top for @Place symbol users +/LoutPageSet +{ + /LoutPageDict 5 dict def + LoutPageDict begin + /matr matrix currentmatrix def + /left 0 def + /right xsize def + /foot 0 def + /top ysize def + end + +} def + +%%EndResource + +%%EndProlog + +%%BeginSetup +%%IncludeResource: font Times-Roman +/Times-Romanfnt82 vec2 /Times-Roman LoutRecode +/fnt82 { /Times-Romanfnt82 LoutFont } def +%%IncludeResource: font Helvetica +/Helveticafnt35 vec2 /Helvetica LoutRecode +/fnt35 { /Helveticafnt35 LoutFont } def +%%EndSetup + +%%Page: 8 1 +%%BeginPageSetup +%%PageResources: font Times-Roman +%%+ font Times-Bold +%%+ font Symbol +%%+ font Courier +%%+ font Times-Italic +/pgsave save def +%%IncludeResource: font Times-Bold +/Times-Boldfnt84 vec2 /Times-Bold LoutRecode +/fnt84 { /Times-Boldfnt84 LoutFont } def +%%IncludeResource: font Symbol +/fnt78 { /Symbol LoutFont } def +%%IncludeResource: font Courier +/Courierfnt29 vec2 /Courier LoutRecode +/fnt29 { /Courierfnt29 LoutFont } def +%%IncludeResource: font Times-Italic +/Times-Italicfnt83 vec2 /Times-Italic LoutRecode +/fnt83 { /Times-Italicfnt83 LoutFont } def +0.0500 dup scale 10 setlinewidth +%%EndPageSetup +gsave +0 0 translate +320 fnt82 0.0 0.0 0.0 setrgbcolor 11900 16840 0 0 320 384 80 LoutGraphic +gsave +LoutPageSet +grestore +gsave +0 0 translate +90.0000 rotate + +grestore + +grestore +gsave +0 0 translate +90.0000 rotate +gsave +1417 -9065 translate +320 fnt82 0.0 0.0 0.0 setrgbcolor 14006 7648 0 7648 320 384 80 LoutGraphic +gsave +0 LoutMargSet +grestore +160 fnt82 0.0 0.0 0.0 setrgbcolor 13934 7540(8)m 320 fnt84 5229 6509(Grunnleggande)m +7431(datatypar)s 320 fnt82 0 5464(Inte)m 4(ger)k 640 5080(Heiltalsobjekt.)m +2647(Di)s 8(visjon)k 3814(er)s 4142(a)s 6(vrunda)k +5246(mot)s 320 fnt78 5822 5072(-\245)m 320 fnt82 6217 5080(.)m +300 fnt29 6355 5089(-3/2)m 320 fnt82 7155 5080(er)m 7483(mao)s +300 fnt29 8104 5089(-2)m 320 fnt82 8464 5080(.)m 0 4409(Lange)m +873(inte)s 4(ger)k 640 4025(Som)m 1305(inte)s 4(ger)k 12(,)k +2318(men)s 2944(kan)s 3482(v)s 4(era)k 4108(vilk\345rle)s 4(g)k +5309(store.)s 6147(Dvs,)s 6805(ikkje)s 7517(a)s 6(vgrensa)k +8727(a)s 6(v)k 9096(MAXINT)s 10449(p\345)s 10831(systemet.)s +0 3354(Flyttal)m 640 2970(V)m 35(anle)k 4(gvis)k 1963(direkte)s +2923(implementert)s 4703(p\345)s 5085(toppen)s 6031(a)s 6(v)k +6400(double)s 7344(precision)s 8590(\210oats)s 9348(i)s 9508(C)s +9791(p\345)s 10173(den)s 10711(aktuelle)s 11795(plattforma.)s 0 2299(K)m 11(omplekse)k +1518(tal)s 640 1915(\(x+yj\))m 0 1246(Streng)m 1(ar)k 640 862(Kan)m +1249(innehalde)s 300 fnt29 2565 871(\\000)m 320 fnt82 3285 862(.)m +3423(Streng)s 1(ar)k 4583(er)s 4911(statisk)s 3(e)k +5938(objekt,)s 6879(ein)s 7345(kan)s 320 fnt83 7883 864(ikkje)m +320 fnt82 8555 862(endre)m 9339(ein)s 9805(streng)s 10656(i)s +10816(Python,)s 11864(slik)s 3(e)k 12537(ef)s 8(fektar)k +640 478(oppn\345r)m 1608(ein)s 2074(v)s 4(ed)k 2610(\345)s +2832(k)s 3(onstruere)k 4251(n)s 4(ye)k 4783(streng)s 1(ar)k 17(.)k + +grestore + +grestore + +pgsave restore +showpage + +%%Trailer +%%DocumentNeededResources: font Courier +%%+ font Helvetica +%%+ font Helvetica-Oblique +%%+ font Symbol +%%+ font Times-Roman +%%+ font Times-Italic +%%+ font Times-Bold +%%DocumentSuppliedResources: procset LoutStartUp +%%+ procset LoutMarginNotes +%%+ encoding vec2 +%%Pages: 23 +%%EOF + +postslide + +%%Page: 5 12 +%%BeginPageSetup +save +%%EndPageSetup + +preslide +%!PS-Adobe-3.0 +%%Creator: Basser Lout Version 3.08 (May 1996) +%%CreationDate: Fri Sep 17 13:15:54 1999 +%%DocumentData: Binary +%%DocumentNeededResources: (atend) +%%DocumentSuppliedResources: (atend) +%%Pages: 1 0 +%%BoundingBox: 0 0 595 842 +%%EndComments + +%%BeginProlog +%%BeginResource: procset LoutStartUp +/m { 3 1 roll moveto show } bind def +/s { exch currentpoint exch pop moveto show } bind def +/k { exch neg 0 rmoveto show } bind def +/ul { gsave setlinewidth dup 3 1 roll + moveto lineto stroke grestore } bind def +/in { 1440 mul } def +/cm { 567 mul } def +/pt { 20 mul } def +/em { 120 mul } def +/sp { louts mul } def +/vs { loutv mul } def +/ft { loutf mul } def +/dg { } def + +/LoutGraphic { + /louts exch def + /loutv exch def + /loutf exch def + /ymark exch def + /xmark exch def + /ysize exch def + /xsize exch def +} def + +/LoutFont +{ findfont exch scalefont setfont +} bind def + +/LoutRecode { + { findfont dup length dict begin + {1 index /FID ne {def} {pop pop} ifelse} forall + /Encoding exch def + currentdict end definefont pop + } + stopped pop +} bind def + +/BeginEPSF { + /LoutEPSFState save def + /dict_count countdictstack def + /op_count count 1 sub def + userdict begin + /showpage { } def + 0 setgray 0 setlinecap + 1 setlinewidth 0 setlinejoin + 10 setmiterlimit [] 0 setdash newpath + /languagelevel where + { pop languagelevel + 1 ne + { false setstrokeadjust false setoverprint + } if + } if +} bind def + +/EndEPSF { + count op_count sub { pop } repeat + countdictstack dict_count sub { end } repeat + LoutEPSFState restore +} bind def +%%EndResource + +%%BeginResource encoding vec2 +/vec2 [ +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quoteright +/parenleft /parenright /asterisk /plus /comma /hyphen /period /slash +/zero /one /two /three /four /five /six /seven +/eight /nine /colon /semicolon /less /equal /greater /question +/at /A /B /C /D /E /F /G +/H /I /J /K /L /M /N /O +/P /Q /R /S /T /U /V /W +/X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore +/quoteleft /a /b /c /d /e /f /g +/h /i /j /k /l /m /n /o +/p /q /r /s /t /u /v /w +/x /y /z /braceleft /bar /braceright /asciitilde /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /quotedblleft /quotedblright /fi +/fl /endash /emdash /bullet /dagger /daggerdbl /florin /fraction +/dotlessi /grave /acute /circumflex /tilde /macron /breve /dotaccent +/dieresis /.notdef /ring /cedilla /.notdef /hungarumlaut /ogonek /caron +/space /exclamdown /cent /sterling /currency /yen /brokenbar /section +/dieresis /copyright /ordfeminine /guillemotleft /logicalnot /hyphen /registered /macron +/degree /plusminus /twosuperior /threesuperior /acute /mu /paragraph /periodcentered +/cedilla /onesuperior /ordmasculine /guillemotright /onequarter /onehalf /threequarters /questiondown +/Agrave /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla +/Egrave /Eacute /Ecircumflex /Edieresis /Igrave /Iacute /Icircumflex /Idieresis +/Eth /Ntilde /Ograve /Oacute /Ocircumflex /Otilde /Odieresis /multiply +/Oslash /Ugrave /Uacute /Ucircumflex /Udieresis /Yacute /Thorn /germandbls +/agrave /aacute /acircumflex /atilde /adieresis /aring /ae /ccedilla +/egrave /eacute /ecircumflex /edieresis /igrave /iacute /icircumflex /idieresis +/eth /ntilde /ograve /oacute /ocircumflex /otilde /odieresis /divide +/oslash /ugrave /uacute /ucircumflex /udieresis /yacute /thorn /ydieresis +] def +%%EndResource + +%%BeginResource: procset LoutMarginNotes +% @PrependGraphic file /usr/local/lib/lout/include/dl.lpg + +% path for @Box symbol +/LoutBox +{ 0 0 moveto xsize 0 lineto + xsize ysize lineto 0 ysize lineto + closepath +} def + +% path for @CurveBox symbol +/LoutCurveBox +{ xmark 0 moveto + xsize xmark sub xmark xmark 270 360 arc + xsize xmark sub ysize xmark sub xmark 0 90 arc + xmark ysize xmark sub xmark 90 180 arc + xmark xmark xmark 180 270 arc + closepath +} def + +% path for @ShadowBox symbol +/LoutShadowBox +{ xmark 2 mul 0 moveto xsize 0 lineto + xsize ysize xmark 2 mul sub lineto + xsize xmark sub ysize xmark 2 mul sub lineto + xsize xmark sub xmark lineto + xmark 2 mul xmark lineto + closepath +} def + +% set up dictionary containing margin note data: parity LoutMargSet - +/LoutMargSet +{ /LoutMargDict 12 dict def + LoutMargDict begin + /parity exch def + /matr matrix currentmatrix def + /rightx xsize def + /lefty ysize def % highest allowable point for top of next left note + /righty ysize def % highest allowable point for top of next right note + /max { 2 copy gt { pop } { exch pop } ifelse } def + /min { 2 copy lt { pop } { exch pop } ifelse } def + end +} def + +%translate coordinate system for marginal notes: type LoutMargShift - +% where type 0 is left margin, 1 is right margin, 2 is outer, 3 is inner +/LoutMargShift +{ LoutMargDict begin + + % y coordinate of top of note, in margin coords, before vertical adjust + 0 ysize transform matr itransform exch pop + + % decide whether left or right margin based on type and parity + exch [ 0 1 parity 1 parity sub ] exch get 0 eq + { + % left margin: adjust top of note downwards if overlaps previous note + lefty min + + % bottom of note is new lefty position and also translate position + ysize sub dup /lefty exch def + + % want right edge of note at coordinate zero + xsize neg exch + } + { + % right margin: adjust top of note downwards if overlaps previous note + righty min + + % bottom of note is new righty position and also translate position + ysize sub dup /righty exch def + + % want left edge of note at coordinate rightx + rightx exch + } ifelse + + % stack now contains coord of bottom left corner in margin coordinates + matr setmatrix translate + end +} def + +% create LoutPageDict with left, right, foot, top for @Place symbol users +/LoutPageSet +{ + /LoutPageDict 5 dict def + LoutPageDict begin + /matr matrix currentmatrix def + /left 0 def + /right xsize def + /foot 0 def + /top ysize def + end + +} def + +%%EndResource + +%%EndProlog + +%%BeginSetup +%%IncludeResource: font Times-Roman +/Times-Romanfnt82 vec2 /Times-Roman LoutRecode +/fnt82 { /Times-Romanfnt82 LoutFont } def +%%IncludeResource: font Helvetica +/Helveticafnt35 vec2 /Helvetica LoutRecode +/fnt35 { /Helveticafnt35 LoutFont } def +%%EndSetup + +%%Page: 9 1 +%%BeginPageSetup +%%PageResources: font Times-Roman +/pgsave save def +0.0500 dup scale 10 setlinewidth +%%EndPageSetup +gsave +0 0 translate +320 fnt82 0.0 0.0 0.0 setrgbcolor 11900 16840 0 0 320 384 80 LoutGraphic +gsave +LoutPageSet +grestore +gsave +0 0 translate +90.0000 rotate + +grestore + +grestore +gsave +0 0 translate +90.0000 rotate +gsave +1417 -9065 translate +320 fnt82 0.0 0.0 0.0 setrgbcolor 14006 7648 0 7648 320 384 80 LoutGraphic +gsave +1 LoutMargSet +grestore +160 fnt82 0.0 0.0 0.0 setrgbcolor 13932 7540(9)m 320 fnt82 0 6894(Lister)m +640 6510(\253Dynamisk)m 3(e)k 2326(arrays.\273)s 3413(Kan)s 4022(innehalde)s +5338(alle)s 5872(slags)s 6577(objekt.)s 7593(T)s 11(reng)k +8416(ikkje)s 9128(innehalde)s 10444(berre)s 11174(ein)s 11640(type)s +12264(objekt)s 13142(i)s 13302(ei)s 640 6126(liste.)m 0 5521(T)m 14(uples)k +640 5137(\253Statisk)m 3(e)k 1880(arrays.\273)s 2967(Fungerer)s 4200(p\345)s +4582(same)s 5312(m\345te)s 6006(som)s 6618(lister)s 12(,)k +7385(men)s 8011(kan)s 8549(i)s 8709(likskap)s 9702(med)s +10330(streng)s 1(ar)k 11437(ikkje)s 12149(endrast.)s 0 4466(Dictionaries)m +640 4082(Assosiati)m 8(v)k 4(e)k 2173(arrays.)s 3171(Kan)s +3780(n)s 4(ytte)k 4488(alle)s 5022(slags)s 5727(statisk)s 3(e,)k +6823(dvs)s 7334(hashbare,)s 8613(objekt)s 9491(som)s 10103(n\370kk)s 3(el.)k +11188(T)s 11(ilsv)k 8(arer)k 12400(ein)s 12866(\253hash\273)s +13839(i)s 640 3698(Perl.)m +grestore + +grestore + +pgsave restore +showpage + +%%Trailer +%%DocumentNeededResources: font Courier +%%+ font Helvetica +%%+ font Helvetica-Oblique +%%+ font Symbol +%%+ font Times-Roman +%%+ font Times-Italic +%%+ font Times-Bold +%%DocumentSuppliedResources: procset LoutStartUp +%%+ procset LoutMarginNotes +%%+ encoding vec2 +%%Pages: 23 +%%EOF + +postslide + +preslide +%!PS-Adobe-3.0 +%%Creator: Basser Lout Version 3.08 (May 1996) +%%CreationDate: Fri Sep 17 13:15:54 1999 +%%DocumentData: Binary +%%DocumentNeededResources: (atend) +%%DocumentSuppliedResources: (atend) +%%Pages: 1 0 +%%BoundingBox: 0 0 595 842 +%%EndComments + +%%BeginProlog +%%BeginResource: procset LoutStartUp +/m { 3 1 roll moveto show } bind def +/s { exch currentpoint exch pop moveto show } bind def +/k { exch neg 0 rmoveto show } bind def +/ul { gsave setlinewidth dup 3 1 roll + moveto lineto stroke grestore } bind def +/in { 1440 mul } def +/cm { 567 mul } def +/pt { 20 mul } def +/em { 120 mul } def +/sp { louts mul } def +/vs { loutv mul } def +/ft { loutf mul } def +/dg { } def + +/LoutGraphic { + /louts exch def + /loutv exch def + /loutf exch def + /ymark exch def + /xmark exch def + /ysize exch def + /xsize exch def +} def + +/LoutFont +{ findfont exch scalefont setfont +} bind def + +/LoutRecode { + { findfont dup length dict begin + {1 index /FID ne {def} {pop pop} ifelse} forall + /Encoding exch def + currentdict end definefont pop + } + stopped pop +} bind def + +/BeginEPSF { + /LoutEPSFState save def + /dict_count countdictstack def + /op_count count 1 sub def + userdict begin + /showpage { } def + 0 setgray 0 setlinecap + 1 setlinewidth 0 setlinejoin + 10 setmiterlimit [] 0 setdash newpath + /languagelevel where + { pop languagelevel + 1 ne + { false setstrokeadjust false setoverprint + } if + } if +} bind def + +/EndEPSF { + count op_count sub { pop } repeat + countdictstack dict_count sub { end } repeat + LoutEPSFState restore +} bind def +%%EndResource + +%%BeginResource encoding vec2 +/vec2 [ +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quoteright +/parenleft /parenright /asterisk /plus /comma /hyphen /period /slash +/zero /one /two /three /four /five /six /seven +/eight /nine /colon /semicolon /less /equal /greater /question +/at /A /B /C /D /E /F /G +/H /I /J /K /L /M /N /O +/P /Q /R /S /T /U /V /W +/X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore +/quoteleft /a /b /c /d /e /f /g +/h /i /j /k /l /m /n /o +/p /q /r /s /t /u /v /w +/x /y /z /braceleft /bar /braceright /asciitilde /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /quotedblleft /quotedblright /fi +/fl /endash /emdash /bullet /dagger /daggerdbl /florin /fraction +/dotlessi /grave /acute /circumflex /tilde /macron /breve /dotaccent +/dieresis /.notdef /ring /cedilla /.notdef /hungarumlaut /ogonek /caron +/space /exclamdown /cent /sterling /currency /yen /brokenbar /section +/dieresis /copyright /ordfeminine /guillemotleft /logicalnot /hyphen /registered /macron +/degree /plusminus /twosuperior /threesuperior /acute /mu /paragraph /periodcentered +/cedilla /onesuperior /ordmasculine /guillemotright /onequarter /onehalf /threequarters /questiondown +/Agrave /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla +/Egrave /Eacute /Ecircumflex /Edieresis /Igrave /Iacute /Icircumflex /Idieresis +/Eth /Ntilde /Ograve /Oacute /Ocircumflex /Otilde /Odieresis /multiply +/Oslash /Ugrave /Uacute /Ucircumflex /Udieresis /Yacute /Thorn /germandbls +/agrave /aacute /acircumflex /atilde /adieresis /aring /ae /ccedilla +/egrave /eacute /ecircumflex /edieresis /igrave /iacute /icircumflex /idieresis +/eth /ntilde /ograve /oacute /ocircumflex /otilde /odieresis /divide +/oslash /ugrave /uacute /ucircumflex /udieresis /yacute /thorn /ydieresis +] def +%%EndResource + +%%BeginResource: procset LoutMarginNotes +% @PrependGraphic file /usr/local/lib/lout/include/dl.lpg + +% path for @Box symbol +/LoutBox +{ 0 0 moveto xsize 0 lineto + xsize ysize lineto 0 ysize lineto + closepath +} def + +% path for @CurveBox symbol +/LoutCurveBox +{ xmark 0 moveto + xsize xmark sub xmark xmark 270 360 arc + xsize xmark sub ysize xmark sub xmark 0 90 arc + xmark ysize xmark sub xmark 90 180 arc + xmark xmark xmark 180 270 arc + closepath +} def + +% path for @ShadowBox symbol +/LoutShadowBox +{ xmark 2 mul 0 moveto xsize 0 lineto + xsize ysize xmark 2 mul sub lineto + xsize xmark sub ysize xmark 2 mul sub lineto + xsize xmark sub xmark lineto + xmark 2 mul xmark lineto + closepath +} def + +% set up dictionary containing margin note data: parity LoutMargSet - +/LoutMargSet +{ /LoutMargDict 12 dict def + LoutMargDict begin + /parity exch def + /matr matrix currentmatrix def + /rightx xsize def + /lefty ysize def % highest allowable point for top of next left note + /righty ysize def % highest allowable point for top of next right note + /max { 2 copy gt { pop } { exch pop } ifelse } def + /min { 2 copy lt { pop } { exch pop } ifelse } def + end +} def + +%translate coordinate system for marginal notes: type LoutMargShift - +% where type 0 is left margin, 1 is right margin, 2 is outer, 3 is inner +/LoutMargShift +{ LoutMargDict begin + + % y coordinate of top of note, in margin coords, before vertical adjust + 0 ysize transform matr itransform exch pop + + % decide whether left or right margin based on type and parity + exch [ 0 1 parity 1 parity sub ] exch get 0 eq + { + % left margin: adjust top of note downwards if overlaps previous note + lefty min + + % bottom of note is new lefty position and also translate position + ysize sub dup /lefty exch def + + % want right edge of note at coordinate zero + xsize neg exch + } + { + % right margin: adjust top of note downwards if overlaps previous note + righty min + + % bottom of note is new righty position and also translate position + ysize sub dup /righty exch def + + % want left edge of note at coordinate rightx + rightx exch + } ifelse + + % stack now contains coord of bottom left corner in margin coordinates + matr setmatrix translate + end +} def + +% create LoutPageDict with left, right, foot, top for @Place symbol users +/LoutPageSet +{ + /LoutPageDict 5 dict def + LoutPageDict begin + /matr matrix currentmatrix def + /left 0 def + /right xsize def + /foot 0 def + /top ysize def + end + +} def + +%%EndResource + +%%EndProlog + +%%BeginSetup +%%IncludeResource: font Times-Roman +/Times-Romanfnt82 vec2 /Times-Roman LoutRecode +/fnt82 { /Times-Romanfnt82 LoutFont } def +%%IncludeResource: font Helvetica +/Helveticafnt35 vec2 /Helvetica LoutRecode +/fnt35 { /Helveticafnt35 LoutFont } def +%%EndSetup + +%%Page: 10 1 +%%BeginPageSetup +%%PageResources: font Times-Roman +%%+ font Times-Bold +%%+ font Courier +/pgsave save def +%%IncludeResource: font Times-Bold +/Times-Boldfnt84 vec2 /Times-Bold LoutRecode +/fnt84 { /Times-Boldfnt84 LoutFont } def +%%IncludeResource: font Courier +/Courierfnt29 vec2 /Courier LoutRecode +/fnt29 { /Courierfnt29 LoutFont } def +0.0500 dup scale 10 setlinewidth +%%EndPageSetup +gsave +0 0 translate +320 fnt82 0.0 0.0 0.0 setrgbcolor 11900 16840 0 0 320 384 80 LoutGraphic +gsave +LoutPageSet +grestore +gsave +0 0 translate +90.0000 rotate + +grestore + +grestore +gsave +0 0 translate +90.0000 rotate +gsave +1417 -9065 translate +320 fnt82 0.0 0.0 0.0 setrgbcolor 14006 7648 0 7648 320 384 80 LoutGraphic +gsave +0 LoutMargSet +grestore +160 fnt82 0.0 0.0 0.0 setrgbcolor 13849 7540(10)m 320 fnt84 6049 6509(Slice-notasjon)m +320 fnt82 0 5833(I)m 181(streng)s 1(ar)k 12(,)k +1339(lister)s 2055(og)s 2446(tuples,)s 3351(eller)s 3997(mao)s +4618(sekv)s 4(ensobjekt,)k 6567(starter)s 7443(nummerering)s 1(a)k +9384(fr\345)s 9818(0.)s 10116(Eit)s 10567(element)s 11657(v)s 4(ert)k +12229(adressert)s 13443(v)s 4(ed)k 300 fnt29 0 5458(objekt[indeks])m +320 fnt82 2520 5449(.)m 2646(Td:)s 300 fnt29 3209 5458("abc"[1])m +320 fnt82 4716 5449(returnerer)m 300 fnt29 6041 5458(b)m 320 fnt82 +6221 5449(.)m 6346(Ne)s 4(g)k 1(ati)k 8(v)k 4(e)k +7544(tal)s 7923(v)s 4(ert)k 8482(tolka)s 9187(slik)s +9715(at)s 10013(indeksen)s 300 fnt29 11212 5458(-1)m 320 fnt82 +11639 5449(referer)m 12556(til)s 12881(det)s 13338(\370vste)s 0 5065(elementet)m +1320(i)s 1480(sekv)s 4(ensen,)k 2933(ein)s 3399(tel)s +3791(baklengs)s 4994(nedo)s 4(v)k 4(er)k 6096(i)s +6256(sekv)s 4(ensen.)k 300 fnt29 7784 5074("abc"[-2])m 320 fnt82 +9484 5065(returnerer)m 300 fnt29 10822 5074(b)m 320 fnt82 11002 5065(.)m +640 4566(Alle)m 1263(sekv)s 4(ensobjekt)k 3149(st\370r)s 3707(slicenotasjon.)s +5591(Ein)s 6110(slice)s 6768(er)s 7096(ein)s 7562(subsekv)s 4(ens)k +9081(a)s 6(v)k 9450(ein)s 9916(sekv)s 4(ens.)k +11142(Notasjonen)s 12673(er)s 300 fnt29 0 4191(objekt[start:slutt])m 320 fnt82 +3420 4182(.)m 3558(Ein)s 4077(n)s 4(yttig)k 4888(m\345te)s +5582(\345)s 5804(visualisere)s 7242(slices)s 8017(p\345)s 8399(er)s +8727(\345)s 8949(sj\345)s 9383(for)s 9835(se)s 4(g)k +10328(at)s 10638(dei)s 11100(er)s 11428(mellom)s 12482(elementene)s +0 3798(i)m 160(sekv)s 4(ensen,)k 1613(da)s 1995(dei)s +2457(fungerer)s 3619(som)s 4231(f\370lger:)s 5214(0)s 5447(refererer)s +6625(til)s 6963(eit)s 7361(punkt)s 8169(f\370r)s 8621(det)s +9091(f\370rste)s 9891(elementet)s 11211(i)s 11371(lista,)s 12044(1)s +12251(til)s 12589(eit)s 12987(punkt)s 0 3414(mellom)m 1054(det)s +1524(f\370rste)s 2324(og)s 2715(det)s 3185(andre,)s 4038(etc.)s +4628(Utel\351t)s 5487(ein)s 300 fnt29 5953 3423(start)m 320 fnt82 +6933 3414(eller)m 300 fnt29 7579 3423(slutt)m 320 fnt82 8559 3414(v)m 4(ert)k +9131(dei)s 9593(henhaldsvis)s 11168(tolka)s 11886(som)s 12498(f\370r)s +12950(starten)s 0 3030(p\345)m 382(lista)s 992(eller)s 1638(etter)s +2284(slutten)s 3210(a)s 6(v)k 3579(lista.)s 4327(Eksempelvis)s +300 fnt29 6025 3039("abcdef"[:3])m 320 fnt82 8265 3030(returnerer)m 300 fnt29 +9603 3039("abc")m 320 fnt82 10503 3030(,)m 10646(medan)s 300 fnt29 +11574 3039("abcdef"[2:4])m 320 fnt82 0 2646(returnerer)m 300 fnt29 1338 2655("cd")m +320 fnt82 2058 2646(.)m +grestore + +grestore + +pgsave restore +showpage + +%%Trailer +%%DocumentNeededResources: font Courier +%%+ font Helvetica +%%+ font Helvetica-Oblique +%%+ font Symbol +%%+ font Times-Roman +%%+ font Times-Italic +%%+ font Times-Bold +%%DocumentSuppliedResources: procset LoutStartUp +%%+ procset LoutMarginNotes +%%+ encoding vec2 +%%Pages: 23 +%%EOF + +postslide + +%%Page: 6 12 +%%BeginPageSetup +save +%%EndPageSetup + +preslide +%!PS-Adobe-3.0 +%%Creator: Basser Lout Version 3.08 (May 1996) +%%CreationDate: Fri Sep 17 13:15:54 1999 +%%DocumentData: Binary +%%DocumentNeededResources: (atend) +%%DocumentSuppliedResources: (atend) +%%Pages: 1 0 +%%BoundingBox: 0 0 595 842 +%%EndComments + +%%BeginProlog +%%BeginResource: procset LoutStartUp +/m { 3 1 roll moveto show } bind def +/s { exch currentpoint exch pop moveto show } bind def +/k { exch neg 0 rmoveto show } bind def +/ul { gsave setlinewidth dup 3 1 roll + moveto lineto stroke grestore } bind def +/in { 1440 mul } def +/cm { 567 mul } def +/pt { 20 mul } def +/em { 120 mul } def +/sp { louts mul } def +/vs { loutv mul } def +/ft { loutf mul } def +/dg { } def + +/LoutGraphic { + /louts exch def + /loutv exch def + /loutf exch def + /ymark exch def + /xmark exch def + /ysize exch def + /xsize exch def +} def + +/LoutFont +{ findfont exch scalefont setfont +} bind def + +/LoutRecode { + { findfont dup length dict begin + {1 index /FID ne {def} {pop pop} ifelse} forall + /Encoding exch def + currentdict end definefont pop + } + stopped pop +} bind def + +/BeginEPSF { + /LoutEPSFState save def + /dict_count countdictstack def + /op_count count 1 sub def + userdict begin + /showpage { } def + 0 setgray 0 setlinecap + 1 setlinewidth 0 setlinejoin + 10 setmiterlimit [] 0 setdash newpath + /languagelevel where + { pop languagelevel + 1 ne + { false setstrokeadjust false setoverprint + } if + } if +} bind def + +/EndEPSF { + count op_count sub { pop } repeat + countdictstack dict_count sub { end } repeat + LoutEPSFState restore +} bind def +%%EndResource + +%%BeginResource encoding vec2 +/vec2 [ +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quoteright +/parenleft /parenright /asterisk /plus /comma /hyphen /period /slash +/zero /one /two /three /four /five /six /seven +/eight /nine /colon /semicolon /less /equal /greater /question +/at /A /B /C /D /E /F /G +/H /I /J /K /L /M /N /O +/P /Q /R /S /T /U /V /W +/X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore +/quoteleft /a /b /c /d /e /f /g +/h /i /j /k /l /m /n /o +/p /q /r /s /t /u /v /w +/x /y /z /braceleft /bar /braceright /asciitilde /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /quotedblleft /quotedblright /fi +/fl /endash /emdash /bullet /dagger /daggerdbl /florin /fraction +/dotlessi /grave /acute /circumflex /tilde /macron /breve /dotaccent +/dieresis /.notdef /ring /cedilla /.notdef /hungarumlaut /ogonek /caron +/space /exclamdown /cent /sterling /currency /yen /brokenbar /section +/dieresis /copyright /ordfeminine /guillemotleft /logicalnot /hyphen /registered /macron +/degree /plusminus /twosuperior /threesuperior /acute /mu /paragraph /periodcentered +/cedilla /onesuperior /ordmasculine /guillemotright /onequarter /onehalf /threequarters /questiondown +/Agrave /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla +/Egrave /Eacute /Ecircumflex /Edieresis /Igrave /Iacute /Icircumflex /Idieresis +/Eth /Ntilde /Ograve /Oacute /Ocircumflex /Otilde /Odieresis /multiply +/Oslash /Ugrave /Uacute /Ucircumflex /Udieresis /Yacute /Thorn /germandbls +/agrave /aacute /acircumflex /atilde /adieresis /aring /ae /ccedilla +/egrave /eacute /ecircumflex /edieresis /igrave /iacute /icircumflex /idieresis +/eth /ntilde /ograve /oacute /ocircumflex /otilde /odieresis /divide +/oslash /ugrave /uacute /ucircumflex /udieresis /yacute /thorn /ydieresis +] def +%%EndResource + +%%BeginResource: procset LoutMarginNotes +% @PrependGraphic file /usr/local/lib/lout/include/dl.lpg + +% path for @Box symbol +/LoutBox +{ 0 0 moveto xsize 0 lineto + xsize ysize lineto 0 ysize lineto + closepath +} def + +% path for @CurveBox symbol +/LoutCurveBox +{ xmark 0 moveto + xsize xmark sub xmark xmark 270 360 arc + xsize xmark sub ysize xmark sub xmark 0 90 arc + xmark ysize xmark sub xmark 90 180 arc + xmark xmark xmark 180 270 arc + closepath +} def + +% path for @ShadowBox symbol +/LoutShadowBox +{ xmark 2 mul 0 moveto xsize 0 lineto + xsize ysize xmark 2 mul sub lineto + xsize xmark sub ysize xmark 2 mul sub lineto + xsize xmark sub xmark lineto + xmark 2 mul xmark lineto + closepath +} def + +% set up dictionary containing margin note data: parity LoutMargSet - +/LoutMargSet +{ /LoutMargDict 12 dict def + LoutMargDict begin + /parity exch def + /matr matrix currentmatrix def + /rightx xsize def + /lefty ysize def % highest allowable point for top of next left note + /righty ysize def % highest allowable point for top of next right note + /max { 2 copy gt { pop } { exch pop } ifelse } def + /min { 2 copy lt { pop } { exch pop } ifelse } def + end +} def + +%translate coordinate system for marginal notes: type LoutMargShift - +% where type 0 is left margin, 1 is right margin, 2 is outer, 3 is inner +/LoutMargShift +{ LoutMargDict begin + + % y coordinate of top of note, in margin coords, before vertical adjust + 0 ysize transform matr itransform exch pop + + % decide whether left or right margin based on type and parity + exch [ 0 1 parity 1 parity sub ] exch get 0 eq + { + % left margin: adjust top of note downwards if overlaps previous note + lefty min + + % bottom of note is new lefty position and also translate position + ysize sub dup /lefty exch def + + % want right edge of note at coordinate zero + xsize neg exch + } + { + % right margin: adjust top of note downwards if overlaps previous note + righty min + + % bottom of note is new righty position and also translate position + ysize sub dup /righty exch def + + % want left edge of note at coordinate rightx + rightx exch + } ifelse + + % stack now contains coord of bottom left corner in margin coordinates + matr setmatrix translate + end +} def + +% create LoutPageDict with left, right, foot, top for @Place symbol users +/LoutPageSet +{ + /LoutPageDict 5 dict def + LoutPageDict begin + /matr matrix currentmatrix def + /left 0 def + /right xsize def + /foot 0 def + /top ysize def + end + +} def + +%%EndResource + +%%EndProlog + +%%BeginSetup +%%IncludeResource: font Times-Roman +/Times-Romanfnt82 vec2 /Times-Roman LoutRecode +/fnt82 { /Times-Romanfnt82 LoutFont } def +%%IncludeResource: font Helvetica +/Helveticafnt35 vec2 /Helvetica LoutRecode +/fnt35 { /Helveticafnt35 LoutFont } def +%%EndSetup + +%%Page: 11 1 +%%BeginPageSetup +%%PageResources: font Times-Roman +%%+ font Times-Bold +%%+ font Courier +%%+ font Times-Italic +/pgsave save def +%%IncludeResource: font Times-Bold +/Times-Boldfnt84 vec2 /Times-Bold LoutRecode +/fnt84 { /Times-Boldfnt84 LoutFont } def +%%IncludeResource: font Courier +/Courierfnt29 vec2 /Courier LoutRecode +/fnt29 { /Courierfnt29 LoutFont } def +%%IncludeResource: font Times-Italic +/Times-Italicfnt83 vec2 /Times-Italic LoutRecode +/fnt83 { /Times-Italicfnt83 LoutFont } def +0.0500 dup scale 10 setlinewidth +%%EndPageSetup +gsave +0 0 translate +320 fnt82 0.0 0.0 0.0 setrgbcolor 11900 16840 0 0 320 384 80 LoutGraphic +gsave +LoutPageSet +grestore +gsave +0 0 translate +90.0000 rotate + +grestore + +grestore +gsave +0 0 translate +90.0000 rotate +gsave +1417 -9065 translate +320 fnt82 0.0 0.0 0.0 setrgbcolor 14006 7648 0 7648 320 384 80 LoutGraphic +gsave +1 LoutMargSet +grestore +160 fnt82 0.0 0.0 0.0 setrgbcolor 13862 7540(11)m 320 fnt84 5168 6511(\253Mutability\273)m +7013(og)s 7408(r)s 5(eferansar)k 320 fnt82 0 5834(Spissformulert)m +1952(har)s 2435(ikkje)s 3141(Python)s 4117(v)s 8(ariablar)k 12(,)k +5368(berre)s 6093(referansar)s 17(.)k 7564(\(Om)s 8224(ein)s +8684(tenk)s 3(er)k 9554(C)s 9831(kan)s 10364(ein)s +10824(sj\345)s 11253(p\345)s 11629(som)s 12236(alt)s 12628(i)s +12783(Python)s 13758(er)s 0 5450(peikarar)m 1126(som)s 1738(alltid)s +2470(v)s 4(ert)k 3042(dereferert.\))s 4613(Python)s 5594(skil)s +6128(skarpt)s 6988(mellom)s 8042(\253statisk)s 3(e\273)k 9382(og)s +9773(\253v)s 8(ariable\273)k 11180(objekt,)s 12121(om)s 12609(ein)s +13075(utf\370rer)s 0 5066(ein)m 448(operasjon)s 1748(p\345)s 2112(eit)s +2492(statisk)s 3369(objekt)s 4228(vil)s 4620(referansen)s 6008(v)s 4(erte)k +6698(endra)s 7470(til)s 7789(\345)s 7993(peik)s 3(e)k +8738(p\345)s 9102(eit)s 9482(n)s 4(ytt)k 10035(objekt)s +10895(som)s 11489(sv)s 8(arer)k 12323(til)s 12643(den)s +13162(utf\370rte)s 0 4682(operasjonen.)m 0 4011(\213)m 640(Alle)s 1263(taltypar)s 12(,)k +2368(streng)s 1(ar)k 12(,)k 3526(funksjonar)s 4972(og)s +5363(tuples)s 6192(er)s 6520(statisk)s 3(e.)k 0 3340(\213)m +640(Lister)s 1463(og)s 1854(dictionaries)s 3409(er)s 3737(v)s 8(ariable.)k +0 2660(\213)m 640(Brukarde\207nerte)s 2718(objekt)s 3596(kan)s 4134(fungere)s +5184(b\345de)s 5862(som)s 6474(statisk)s 3(e)k 7501(og)s +7892(v)s 8(ariable.)k 0 1987(\213)m 640(Strengk)s 3(onkatenering,)k +3429(som)s 4029(i)s 300 fnt29 4177 1996("SNOBOL")m 5784(+)s +6132("-IV")s 320 fnt82 7100 1987(vil)m 7498(dermed)s 320 fnt83 +8521 1989(ikkje)m 320 fnt82 9181 1987(le)m 4(gge)k 9931(til)s +300 fnt29 10257 1996(-IV)m 320 fnt82 10864 1987(til)m 300 fnt29 +11190 1996(SNOBOL)m 320 fnt82 12270 1987(,)m 12401(men)s 13014(derimot)s +640 1603(generere)m 1814(ein)s 2280(heilt)s 2926(n)s 4(y)k +3314(streng.)s 4312(T)s 14(uples)k 5234(vil)s 5644(oppf\370re)s +6712(se)s 4(g)k 7205(tilsv)s 8(arande.)k +grestore + +grestore + +pgsave restore +showpage + +%%Trailer +%%DocumentNeededResources: font Courier +%%+ font Helvetica +%%+ font Helvetica-Oblique +%%+ font Symbol +%%+ font Times-Roman +%%+ font Times-Italic +%%+ font Times-Bold +%%DocumentSuppliedResources: procset LoutStartUp +%%+ procset LoutMarginNotes +%%+ encoding vec2 +%%Pages: 23 +%%EOF + +postslide + +preslide +%!PS-Adobe-3.0 +%%Creator: Basser Lout Version 3.08 (May 1996) +%%CreationDate: Fri Sep 17 13:15:54 1999 +%%DocumentData: Binary +%%DocumentNeededResources: (atend) +%%DocumentSuppliedResources: (atend) +%%Pages: 1 0 +%%BoundingBox: 0 0 595 842 +%%EndComments + +%%BeginProlog +%%BeginResource: procset LoutStartUp +/m { 3 1 roll moveto show } bind def +/s { exch currentpoint exch pop moveto show } bind def +/k { exch neg 0 rmoveto show } bind def +/ul { gsave setlinewidth dup 3 1 roll + moveto lineto stroke grestore } bind def +/in { 1440 mul } def +/cm { 567 mul } def +/pt { 20 mul } def +/em { 120 mul } def +/sp { louts mul } def +/vs { loutv mul } def +/ft { loutf mul } def +/dg { } def + +/LoutGraphic { + /louts exch def + /loutv exch def + /loutf exch def + /ymark exch def + /xmark exch def + /ysize exch def + /xsize exch def +} def + +/LoutFont +{ findfont exch scalefont setfont +} bind def + +/LoutRecode { + { findfont dup length dict begin + {1 index /FID ne {def} {pop pop} ifelse} forall + /Encoding exch def + currentdict end definefont pop + } + stopped pop +} bind def + +/BeginEPSF { + /LoutEPSFState save def + /dict_count countdictstack def + /op_count count 1 sub def + userdict begin + /showpage { } def + 0 setgray 0 setlinecap + 1 setlinewidth 0 setlinejoin + 10 setmiterlimit [] 0 setdash newpath + /languagelevel where + { pop languagelevel + 1 ne + { false setstrokeadjust false setoverprint + } if + } if +} bind def + +/EndEPSF { + count op_count sub { pop } repeat + countdictstack dict_count sub { end } repeat + LoutEPSFState restore +} bind def +%%EndResource + +%%BeginResource encoding vec2 +/vec2 [ +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quoteright +/parenleft /parenright /asterisk /plus /comma /hyphen /period /slash +/zero /one /two /three /four /five /six /seven +/eight /nine /colon /semicolon /less /equal /greater /question +/at /A /B /C /D /E /F /G +/H /I /J /K /L /M /N /O +/P /Q /R /S /T /U /V /W +/X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore +/quoteleft /a /b /c /d /e /f /g +/h /i /j /k /l /m /n /o +/p /q /r /s /t /u /v /w +/x /y /z /braceleft /bar /braceright /asciitilde /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /quotedblleft /quotedblright /fi +/fl /endash /emdash /bullet /dagger /daggerdbl /florin /fraction +/dotlessi /grave /acute /circumflex /tilde /macron /breve /dotaccent +/dieresis /.notdef /ring /cedilla /.notdef /hungarumlaut /ogonek /caron +/space /exclamdown /cent /sterling /currency /yen /brokenbar /section +/dieresis /copyright /ordfeminine /guillemotleft /logicalnot /hyphen /registered /macron +/degree /plusminus /twosuperior /threesuperior /acute /mu /paragraph /periodcentered +/cedilla /onesuperior /ordmasculine /guillemotright /onequarter /onehalf /threequarters /questiondown +/Agrave /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla +/Egrave /Eacute /Ecircumflex /Edieresis /Igrave /Iacute /Icircumflex /Idieresis +/Eth /Ntilde /Ograve /Oacute /Ocircumflex /Otilde /Odieresis /multiply +/Oslash /Ugrave /Uacute /Ucircumflex /Udieresis /Yacute /Thorn /germandbls +/agrave /aacute /acircumflex /atilde /adieresis /aring /ae /ccedilla +/egrave /eacute /ecircumflex /edieresis /igrave /iacute /icircumflex /idieresis +/eth /ntilde /ograve /oacute /ocircumflex /otilde /odieresis /divide +/oslash /ugrave /uacute /ucircumflex /udieresis /yacute /thorn /ydieresis +] def +%%EndResource + +%%BeginResource: procset LoutMarginNotes +% @PrependGraphic file /usr/local/lib/lout/include/dl.lpg + +% path for @Box symbol +/LoutBox +{ 0 0 moveto xsize 0 lineto + xsize ysize lineto 0 ysize lineto + closepath +} def + +% path for @CurveBox symbol +/LoutCurveBox +{ xmark 0 moveto + xsize xmark sub xmark xmark 270 360 arc + xsize xmark sub ysize xmark sub xmark 0 90 arc + xmark ysize xmark sub xmark 90 180 arc + xmark xmark xmark 180 270 arc + closepath +} def + +% path for @ShadowBox symbol +/LoutShadowBox +{ xmark 2 mul 0 moveto xsize 0 lineto + xsize ysize xmark 2 mul sub lineto + xsize xmark sub ysize xmark 2 mul sub lineto + xsize xmark sub xmark lineto + xmark 2 mul xmark lineto + closepath +} def + +% set up dictionary containing margin note data: parity LoutMargSet - +/LoutMargSet +{ /LoutMargDict 12 dict def + LoutMargDict begin + /parity exch def + /matr matrix currentmatrix def + /rightx xsize def + /lefty ysize def % highest allowable point for top of next left note + /righty ysize def % highest allowable point for top of next right note + /max { 2 copy gt { pop } { exch pop } ifelse } def + /min { 2 copy lt { pop } { exch pop } ifelse } def + end +} def + +%translate coordinate system for marginal notes: type LoutMargShift - +% where type 0 is left margin, 1 is right margin, 2 is outer, 3 is inner +/LoutMargShift +{ LoutMargDict begin + + % y coordinate of top of note, in margin coords, before vertical adjust + 0 ysize transform matr itransform exch pop + + % decide whether left or right margin based on type and parity + exch [ 0 1 parity 1 parity sub ] exch get 0 eq + { + % left margin: adjust top of note downwards if overlaps previous note + lefty min + + % bottom of note is new lefty position and also translate position + ysize sub dup /lefty exch def + + % want right edge of note at coordinate zero + xsize neg exch + } + { + % right margin: adjust top of note downwards if overlaps previous note + righty min + + % bottom of note is new righty position and also translate position + ysize sub dup /righty exch def + + % want left edge of note at coordinate rightx + rightx exch + } ifelse + + % stack now contains coord of bottom left corner in margin coordinates + matr setmatrix translate + end +} def + +% create LoutPageDict with left, right, foot, top for @Place symbol users +/LoutPageSet +{ + /LoutPageDict 5 dict def + LoutPageDict begin + /matr matrix currentmatrix def + /left 0 def + /right xsize def + /foot 0 def + /top ysize def + end + +} def + +%%EndResource + +%%EndProlog + +%%BeginSetup +%%IncludeResource: font Times-Roman +/Times-Romanfnt82 vec2 /Times-Roman LoutRecode +/fnt82 { /Times-Romanfnt82 LoutFont } def +%%IncludeResource: font Helvetica +/Helveticafnt35 vec2 /Helvetica LoutRecode +/fnt35 { /Helveticafnt35 LoutFont } def +%%EndSetup + +%%Page: 12 1 +%%BeginPageSetup +%%PageResources: font Times-Roman +%%+ font Times-Bold +%%+ font Courier +/pgsave save def +%%IncludeResource: font Times-Bold +/Times-Boldfnt84 vec2 /Times-Bold LoutRecode +/fnt84 { /Times-Boldfnt84 LoutFont } def +%%IncludeResource: font Courier +/Courierfnt29 vec2 /Courier LoutRecode +/fnt29 { /Courierfnt29 LoutFont } def +0.0500 dup scale 10 setlinewidth +%%EndPageSetup +gsave +0 0 translate +320 fnt82 0.0 0.0 0.0 setrgbcolor 11900 16840 0 0 320 384 80 LoutGraphic +gsave +LoutPageSet +grestore +gsave +0 0 translate +90.0000 rotate + +grestore + +grestore +gsave +0 0 translate +90.0000 rotate +gsave +1417 -9065 translate +320 fnt82 0.0 0.0 0.0 setrgbcolor 14006 7648 0 7648 320 384 80 LoutGraphic +gsave +0 LoutMargSet +grestore +160 fnt82 0.0 0.0 0.0 setrgbcolor 13850 7540(12)m 320 fnt84 4247 6511(V)m 11(iktige)k +5303(metodar)s 6533(f)s 8(or)k 7010(lister)s 7777(og)s +8172(dictionaries)s 320 fnt82 0 5843(Det)m 541(viktig)s 1(aste)k +1854(einskildpoenget)s 3956(er)s 4284(funksjonen)s 300 fnt29 5780 5852(dir\(\))m +320 fnt82 6680 5843(.)m 300 fnt29 6818 5852(dir\(x\))m 320 fnt82 +7978 5843(vil)m 8388(syne)s 9048(kv)s 8(a)k 9582(for)s +10034(metodar)s 11160(objekt)s 12038(gjer)s 12614(synle)s 4(ge)k +0 5459(for)m 452(brukaren.)s 1806(Lister)s 2629(og)s 3020(dictionaries)s +4575(st\370re)s 5269(mange)s 6195(\210eire)s 6924(metodar)s 8050(enn)s +8588(nemnt)s 9466(her)s 12(,)k 10005(men)s 10631(her)s +11119(er)s 11447(nokre)s 12249(a)s 6(v)k 12618(dei)s +13080(aller)s 0 5075(viktig)m 1(aste.)k 0 4395(\213)m 300 fnt29 +640 4404(liste.append\(x\))m 320 fnt82 3420 4395(plasserer)m 300 fnt29 4634 4404(x)m +320 fnt82 4894 4395(p\345)m 5276(slutten)s 6202(a)s 6(v)k +6571(lista.)s 0 3724(\213)m 300 fnt29 640 3733(liste.sort\(\))m 320 fnt82 +2880 3724(sorterer)m 3934(lista.)s 0 3098(\213)m 300 fnt29 640 3107(liste.reverse\(\))m +320 fnt82 3420 3098(re)m 8(v)k 4(erserer)k 4764(lista.)s +0 2472(\213)m 300 fnt29 640 2481(liste.index\(x\))m 320 fnt82 3240 2472(returnerer)m +4578(indeksen)s 5790(til)s 6128(f\370rste)s 6928(instans)s 7881(a)s 6(v)k +300 fnt29 8250 2481(x)m 320 fnt82 8510 2472(i)m 8670(lista.)s +0 1835(\213)m 300 fnt29 640 1844(dictionary.has_key\(x\))m 320 fnt82 4500 1835(returner)m +5590(sant)s 6184(eller)s 6830(usant)s 7584(om)s 300 fnt29 +8072 1844(dictionary)m 320 fnt82 9952 1835(henhaldsvis)m 11527(har)s 12015(eller)s +12661(ikkje)s 13373(har)s 640 1451(n\370kk)m 3(elen)k 300 fnt29 +1885 1460(x)m 320 fnt82 2065 1451(.)m 0 814(\213)m 300 fnt29 +640 823(dictionary.keys\(\))m 320 fnt82 3780 814(returnerer)m 5118(n\370klane)s 6204(til)s +300 fnt29 6542 823(dictionary)m 320 fnt82 8342 814(.)m 0 173(\213)m +300 fnt29 640 182(dictionary.values\(\))m 320 fnt82 4140 173(returnerer)m 5478(v)s 4(erdiane)k +6648(lagra)s 7366(i)s 300 fnt29 7526 182(dictionary)m 320 fnt82 +9326 173(.)m +grestore + +grestore + +pgsave restore +showpage + +%%Trailer +%%DocumentNeededResources: font Courier +%%+ font Helvetica +%%+ font Helvetica-Oblique +%%+ font Symbol +%%+ font Times-Roman +%%+ font Times-Italic +%%+ font Times-Bold +%%DocumentSuppliedResources: procset LoutStartUp +%%+ procset LoutMarginNotes +%%+ encoding vec2 +%%Pages: 23 +%%EOF + +postslide + +%%Page: 7 12 +%%BeginPageSetup +save +%%EndPageSetup + +preslide +%!PS-Adobe-3.0 +%%Creator: Basser Lout Version 3.08 (May 1996) +%%CreationDate: Fri Sep 17 13:15:54 1999 +%%DocumentData: Binary +%%DocumentNeededResources: (atend) +%%DocumentSuppliedResources: (atend) +%%Pages: 1 0 +%%BoundingBox: 0 0 595 842 +%%EndComments + +%%BeginProlog +%%BeginResource: procset LoutStartUp +/m { 3 1 roll moveto show } bind def +/s { exch currentpoint exch pop moveto show } bind def +/k { exch neg 0 rmoveto show } bind def +/ul { gsave setlinewidth dup 3 1 roll + moveto lineto stroke grestore } bind def +/in { 1440 mul } def +/cm { 567 mul } def +/pt { 20 mul } def +/em { 120 mul } def +/sp { louts mul } def +/vs { loutv mul } def +/ft { loutf mul } def +/dg { } def + +/LoutGraphic { + /louts exch def + /loutv exch def + /loutf exch def + /ymark exch def + /xmark exch def + /ysize exch def + /xsize exch def +} def + +/LoutFont +{ findfont exch scalefont setfont +} bind def + +/LoutRecode { + { findfont dup length dict begin + {1 index /FID ne {def} {pop pop} ifelse} forall + /Encoding exch def + currentdict end definefont pop + } + stopped pop +} bind def + +/BeginEPSF { + /LoutEPSFState save def + /dict_count countdictstack def + /op_count count 1 sub def + userdict begin + /showpage { } def + 0 setgray 0 setlinecap + 1 setlinewidth 0 setlinejoin + 10 setmiterlimit [] 0 setdash newpath + /languagelevel where + { pop languagelevel + 1 ne + { false setstrokeadjust false setoverprint + } if + } if +} bind def + +/EndEPSF { + count op_count sub { pop } repeat + countdictstack dict_count sub { end } repeat + LoutEPSFState restore +} bind def +%%EndResource + +%%BeginResource encoding vec2 +/vec2 [ +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quoteright +/parenleft /parenright /asterisk /plus /comma /hyphen /period /slash +/zero /one /two /three /four /five /six /seven +/eight /nine /colon /semicolon /less /equal /greater /question +/at /A /B /C /D /E /F /G +/H /I /J /K /L /M /N /O +/P /Q /R /S /T /U /V /W +/X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore +/quoteleft /a /b /c /d /e /f /g +/h /i /j /k /l /m /n /o +/p /q /r /s /t /u /v /w +/x /y /z /braceleft /bar /braceright /asciitilde /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /quotedblleft /quotedblright /fi +/fl /endash /emdash /bullet /dagger /daggerdbl /florin /fraction +/dotlessi /grave /acute /circumflex /tilde /macron /breve /dotaccent +/dieresis /.notdef /ring /cedilla /.notdef /hungarumlaut /ogonek /caron +/space /exclamdown /cent /sterling /currency /yen /brokenbar /section +/dieresis /copyright /ordfeminine /guillemotleft /logicalnot /hyphen /registered /macron +/degree /plusminus /twosuperior /threesuperior /acute /mu /paragraph /periodcentered +/cedilla /onesuperior /ordmasculine /guillemotright /onequarter /onehalf /threequarters /questiondown +/Agrave /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla +/Egrave /Eacute /Ecircumflex /Edieresis /Igrave /Iacute /Icircumflex /Idieresis +/Eth /Ntilde /Ograve /Oacute /Ocircumflex /Otilde /Odieresis /multiply +/Oslash /Ugrave /Uacute /Ucircumflex /Udieresis /Yacute /Thorn /germandbls +/agrave /aacute /acircumflex /atilde /adieresis /aring /ae /ccedilla +/egrave /eacute /ecircumflex /edieresis /igrave /iacute /icircumflex /idieresis +/eth /ntilde /ograve /oacute /ocircumflex /otilde /odieresis /divide +/oslash /ugrave /uacute /ucircumflex /udieresis /yacute /thorn /ydieresis +] def +%%EndResource + +%%BeginResource: procset LoutMarginNotes +% @PrependGraphic file /usr/local/lib/lout/include/dl.lpg + +% path for @Box symbol +/LoutBox +{ 0 0 moveto xsize 0 lineto + xsize ysize lineto 0 ysize lineto + closepath +} def + +% path for @CurveBox symbol +/LoutCurveBox +{ xmark 0 moveto + xsize xmark sub xmark xmark 270 360 arc + xsize xmark sub ysize xmark sub xmark 0 90 arc + xmark ysize xmark sub xmark 90 180 arc + xmark xmark xmark 180 270 arc + closepath +} def + +% path for @ShadowBox symbol +/LoutShadowBox +{ xmark 2 mul 0 moveto xsize 0 lineto + xsize ysize xmark 2 mul sub lineto + xsize xmark sub ysize xmark 2 mul sub lineto + xsize xmark sub xmark lineto + xmark 2 mul xmark lineto + closepath +} def + +% set up dictionary containing margin note data: parity LoutMargSet - +/LoutMargSet +{ /LoutMargDict 12 dict def + LoutMargDict begin + /parity exch def + /matr matrix currentmatrix def + /rightx xsize def + /lefty ysize def % highest allowable point for top of next left note + /righty ysize def % highest allowable point for top of next right note + /max { 2 copy gt { pop } { exch pop } ifelse } def + /min { 2 copy lt { pop } { exch pop } ifelse } def + end +} def + +%translate coordinate system for marginal notes: type LoutMargShift - +% where type 0 is left margin, 1 is right margin, 2 is outer, 3 is inner +/LoutMargShift +{ LoutMargDict begin + + % y coordinate of top of note, in margin coords, before vertical adjust + 0 ysize transform matr itransform exch pop + + % decide whether left or right margin based on type and parity + exch [ 0 1 parity 1 parity sub ] exch get 0 eq + { + % left margin: adjust top of note downwards if overlaps previous note + lefty min + + % bottom of note is new lefty position and also translate position + ysize sub dup /lefty exch def + + % want right edge of note at coordinate zero + xsize neg exch + } + { + % right margin: adjust top of note downwards if overlaps previous note + righty min + + % bottom of note is new righty position and also translate position + ysize sub dup /righty exch def + + % want left edge of note at coordinate rightx + rightx exch + } ifelse + + % stack now contains coord of bottom left corner in margin coordinates + matr setmatrix translate + end +} def + +% create LoutPageDict with left, right, foot, top for @Place symbol users +/LoutPageSet +{ + /LoutPageDict 5 dict def + LoutPageDict begin + /matr matrix currentmatrix def + /left 0 def + /right xsize def + /foot 0 def + /top ysize def + end + +} def + +%%EndResource + +%%EndProlog + +%%BeginSetup +%%IncludeResource: font Times-Roman +/Times-Romanfnt82 vec2 /Times-Roman LoutRecode +/fnt82 { /Times-Romanfnt82 LoutFont } def +%%IncludeResource: font Helvetica +/Helveticafnt35 vec2 /Helvetica LoutRecode +/fnt35 { /Helveticafnt35 LoutFont } def +%%EndSetup + +%%Page: 13 1 +%%BeginPageSetup +%%PageResources: font Times-Roman +%%+ font Courier +/pgsave save def +%%IncludeResource: font Courier +/Courierfnt29 vec2 /Courier LoutRecode +/fnt29 { /Courierfnt29 LoutFont } def +0.0500 dup scale 10 setlinewidth +%%EndPageSetup +gsave +0 0 translate +320 fnt82 0.0 0.0 0.0 setrgbcolor 11900 16840 0 0 320 384 80 LoutGraphic +gsave +LoutPageSet +grestore +gsave +0 0 translate +90.0000 rotate + +grestore + +grestore +gsave +0 0 translate +90.0000 rotate +gsave +1417 -9065 translate +320 fnt82 0.0 0.0 0.0 setrgbcolor 14006 7648 0 7648 320 384 80 LoutGraphic +gsave +1 LoutMargSet +grestore +160 fnt82 0.0 0.0 0.0 setrgbcolor 13857 7540(13)m 320 fnt82 0 6895(\213)m +300 fnt29 640 6904(dictionary.items\(\))m 320 fnt82 3960 6895(returnerer)m 5298(parvis)s +6145(alle)s 6679(n\370klar)s 7575(og)s 7966(v)s 4(erdiar)k +8946(i)s 300 fnt29 9106 6904(dictionary)m 320 fnt82 10906 6895(.)m +0 6215(\213)m 300 fnt29 640 6224(dictionary.get\(key,)m 320 fnt82 4140 6215(x\))m +4471(pr\370v)s 4(er)k 5381(\345)s 5603(returnere)s 300 fnt29 +6829 6224(dictionary[key])m 320 fnt82 9529 6215(,)m 9672(om)s 10160(denne)s +10998(ikkje)s 11710(eksisterer)s 13012(v)s 4(ert)k 300 fnt29 +13584 6224(x)m 320 fnt82 640 5831(returnert.)m +grestore + +grestore + +pgsave restore +showpage + +%%Trailer +%%DocumentNeededResources: font Courier +%%+ font Helvetica +%%+ font Helvetica-Oblique +%%+ font Symbol +%%+ font Times-Roman +%%+ font Times-Italic +%%+ font Times-Bold +%%DocumentSuppliedResources: procset LoutStartUp +%%+ procset LoutMarginNotes +%%+ encoding vec2 +%%Pages: 23 +%%EOF + +postslide + +preslide +%!PS-Adobe-3.0 +%%Creator: Basser Lout Version 3.08 (May 1996) +%%CreationDate: Fri Sep 17 13:15:54 1999 +%%DocumentData: Binary +%%DocumentNeededResources: (atend) +%%DocumentSuppliedResources: (atend) +%%Pages: 1 0 +%%BoundingBox: 0 0 595 842 +%%EndComments + +%%BeginProlog +%%BeginResource: procset LoutStartUp +/m { 3 1 roll moveto show } bind def +/s { exch currentpoint exch pop moveto show } bind def +/k { exch neg 0 rmoveto show } bind def +/ul { gsave setlinewidth dup 3 1 roll + moveto lineto stroke grestore } bind def +/in { 1440 mul } def +/cm { 567 mul } def +/pt { 20 mul } def +/em { 120 mul } def +/sp { louts mul } def +/vs { loutv mul } def +/ft { loutf mul } def +/dg { } def + +/LoutGraphic { + /louts exch def + /loutv exch def + /loutf exch def + /ymark exch def + /xmark exch def + /ysize exch def + /xsize exch def +} def + +/LoutFont +{ findfont exch scalefont setfont +} bind def + +/LoutRecode { + { findfont dup length dict begin + {1 index /FID ne {def} {pop pop} ifelse} forall + /Encoding exch def + currentdict end definefont pop + } + stopped pop +} bind def + +/BeginEPSF { + /LoutEPSFState save def + /dict_count countdictstack def + /op_count count 1 sub def + userdict begin + /showpage { } def + 0 setgray 0 setlinecap + 1 setlinewidth 0 setlinejoin + 10 setmiterlimit [] 0 setdash newpath + /languagelevel where + { pop languagelevel + 1 ne + { false setstrokeadjust false setoverprint + } if + } if +} bind def + +/EndEPSF { + count op_count sub { pop } repeat + countdictstack dict_count sub { end } repeat + LoutEPSFState restore +} bind def +%%EndResource + +%%BeginResource encoding vec2 +/vec2 [ +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quoteright +/parenleft /parenright /asterisk /plus /comma /hyphen /period /slash +/zero /one /two /three /four /five /six /seven +/eight /nine /colon /semicolon /less /equal /greater /question +/at /A /B /C /D /E /F /G +/H /I /J /K /L /M /N /O +/P /Q /R /S /T /U /V /W +/X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore +/quoteleft /a /b /c /d /e /f /g +/h /i /j /k /l /m /n /o +/p /q /r /s /t /u /v /w +/x /y /z /braceleft /bar /braceright /asciitilde /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /quotedblleft /quotedblright /fi +/fl /endash /emdash /bullet /dagger /daggerdbl /florin /fraction +/dotlessi /grave /acute /circumflex /tilde /macron /breve /dotaccent +/dieresis /.notdef /ring /cedilla /.notdef /hungarumlaut /ogonek /caron +/space /exclamdown /cent /sterling /currency /yen /brokenbar /section +/dieresis /copyright /ordfeminine /guillemotleft /logicalnot /hyphen /registered /macron +/degree /plusminus /twosuperior /threesuperior /acute /mu /paragraph /periodcentered +/cedilla /onesuperior /ordmasculine /guillemotright /onequarter /onehalf /threequarters /questiondown +/Agrave /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla +/Egrave /Eacute /Ecircumflex /Edieresis /Igrave /Iacute /Icircumflex /Idieresis +/Eth /Ntilde /Ograve /Oacute /Ocircumflex /Otilde /Odieresis /multiply +/Oslash /Ugrave /Uacute /Ucircumflex /Udieresis /Yacute /Thorn /germandbls +/agrave /aacute /acircumflex /atilde /adieresis /aring /ae /ccedilla +/egrave /eacute /ecircumflex /edieresis /igrave /iacute /icircumflex /idieresis +/eth /ntilde /ograve /oacute /ocircumflex /otilde /odieresis /divide +/oslash /ugrave /uacute /ucircumflex /udieresis /yacute /thorn /ydieresis +] def +%%EndResource + +%%BeginResource: procset LoutMarginNotes +% @PrependGraphic file /usr/local/lib/lout/include/dl.lpg + +% path for @Box symbol +/LoutBox +{ 0 0 moveto xsize 0 lineto + xsize ysize lineto 0 ysize lineto + closepath +} def + +% path for @CurveBox symbol +/LoutCurveBox +{ xmark 0 moveto + xsize xmark sub xmark xmark 270 360 arc + xsize xmark sub ysize xmark sub xmark 0 90 arc + xmark ysize xmark sub xmark 90 180 arc + xmark xmark xmark 180 270 arc + closepath +} def + +% path for @ShadowBox symbol +/LoutShadowBox +{ xmark 2 mul 0 moveto xsize 0 lineto + xsize ysize xmark 2 mul sub lineto + xsize xmark sub ysize xmark 2 mul sub lineto + xsize xmark sub xmark lineto + xmark 2 mul xmark lineto + closepath +} def + +% set up dictionary containing margin note data: parity LoutMargSet - +/LoutMargSet +{ /LoutMargDict 12 dict def + LoutMargDict begin + /parity exch def + /matr matrix currentmatrix def + /rightx xsize def + /lefty ysize def % highest allowable point for top of next left note + /righty ysize def % highest allowable point for top of next right note + /max { 2 copy gt { pop } { exch pop } ifelse } def + /min { 2 copy lt { pop } { exch pop } ifelse } def + end +} def + +%translate coordinate system for marginal notes: type LoutMargShift - +% where type 0 is left margin, 1 is right margin, 2 is outer, 3 is inner +/LoutMargShift +{ LoutMargDict begin + + % y coordinate of top of note, in margin coords, before vertical adjust + 0 ysize transform matr itransform exch pop + + % decide whether left or right margin based on type and parity + exch [ 0 1 parity 1 parity sub ] exch get 0 eq + { + % left margin: adjust top of note downwards if overlaps previous note + lefty min + + % bottom of note is new lefty position and also translate position + ysize sub dup /lefty exch def + + % want right edge of note at coordinate zero + xsize neg exch + } + { + % right margin: adjust top of note downwards if overlaps previous note + righty min + + % bottom of note is new righty position and also translate position + ysize sub dup /righty exch def + + % want left edge of note at coordinate rightx + rightx exch + } ifelse + + % stack now contains coord of bottom left corner in margin coordinates + matr setmatrix translate + end +} def + +% create LoutPageDict with left, right, foot, top for @Place symbol users +/LoutPageSet +{ + /LoutPageDict 5 dict def + LoutPageDict begin + /matr matrix currentmatrix def + /left 0 def + /right xsize def + /foot 0 def + /top ysize def + end + +} def + +%%EndResource + +%%EndProlog + +%%BeginSetup +%%IncludeResource: font Times-Roman +/Times-Romanfnt82 vec2 /Times-Roman LoutRecode +/fnt82 { /Times-Romanfnt82 LoutFont } def +%%IncludeResource: font Helvetica +/Helveticafnt35 vec2 /Helvetica LoutRecode +/fnt35 { /Helveticafnt35 LoutFont } def +%%EndSetup + +%%Page: 14 1 +%%BeginPageSetup +%%PageResources: font Times-Roman +%%+ font Times-Bold +%%+ font Courier +%%+ font Times-Italic +/pgsave save def +%%IncludeResource: font Times-Bold +/Times-Boldfnt84 vec2 /Times-Bold LoutRecode +/fnt84 { /Times-Boldfnt84 LoutFont } def +%%IncludeResource: font Courier +/Courierfnt29 vec2 /Courier LoutRecode +/fnt29 { /Courierfnt29 LoutFont } def +%%IncludeResource: font Times-Italic +/Times-Italicfnt83 vec2 /Times-Italic LoutRecode +/fnt83 { /Times-Italicfnt83 LoutFont } def +0.0500 dup scale 10 setlinewidth +%%EndPageSetup +gsave +0 0 translate +320 fnt82 0.0 0.0 0.0 setrgbcolor 11900 16840 0 0 320 384 80 LoutGraphic +gsave +LoutPageSet +grestore +gsave +0 0 translate +90.0000 rotate + +grestore + +grestore +gsave +0 0 translate +90.0000 rotate +gsave +1417 -9065 translate +320 fnt82 0.0 0.0 0.0 setrgbcolor 14006 7648 0 7648 320 384 80 LoutGraphic +gsave +0 LoutMargSet +grestore +160 fnt82 0.0 0.0 0.0 setrgbcolor 13850 7540(14)m 320 fnt84 3899 6511(Funksjonar)m +5571(og)s 5966(inter)s 3(v)k 3(all)k 7184(og)s +7579(funksjonsmapping)s 300 fnt29 0 5874(def)m 720(fact\(n\):)s 1440 5490(if)m +1980(n)s 2340(==)s 2880(0)s 3240(or)s 3780(n)s +4140(==)s 4680(1:)s 2880 5106(return)m 4140(1)s 1440 4722(else:)m +2880 4338(return)m 4140(n*fact\(n-1\))s 0 3570(print)m 1080(map\(fact,)s 2880(range\(10\)\))s +320 fnt83 0 3064(Merk:)m 300 fnt29 640 2468(map)m 320 fnt82 +1260 2459(returnerer)m 2598(ei)s 2900(liste)s 3504(der)s 300 fnt29 +3992 2468(fact)m 320 fnt82 4792 2459(har)m 5280(v)s 6(orte)k +6004(k\370yrt)s 6758(med)s 7386(kv)s 8(art)k 8114(element)s +9204(i)s 9364(lista)s 9974(generert)s 11100(a)s 6(v)k +300 fnt29 11469 2468(range)m 320 fnt82 12449 2459(som)m 640 2075(ar)m 5(gument.)k + +grestore + +grestore + +pgsave restore +showpage + +%%Trailer +%%DocumentNeededResources: font Courier +%%+ font Helvetica +%%+ font Helvetica-Oblique +%%+ font Symbol +%%+ font Times-Roman +%%+ font Times-Italic +%%+ font Times-Bold +%%DocumentSuppliedResources: procset LoutStartUp +%%+ procset LoutMarginNotes +%%+ encoding vec2 +%%Pages: 23 +%%EOF + +postslide + +%%Page: 8 12 +%%BeginPageSetup +save +%%EndPageSetup + +preslide +%!PS-Adobe-3.0 +%%Creator: Basser Lout Version 3.08 (May 1996) +%%CreationDate: Fri Sep 17 13:15:54 1999 +%%DocumentData: Binary +%%DocumentNeededResources: (atend) +%%DocumentSuppliedResources: (atend) +%%Pages: 1 0 +%%BoundingBox: 0 0 595 842 +%%EndComments + +%%BeginProlog +%%BeginResource: procset LoutStartUp +/m { 3 1 roll moveto show } bind def +/s { exch currentpoint exch pop moveto show } bind def +/k { exch neg 0 rmoveto show } bind def +/ul { gsave setlinewidth dup 3 1 roll + moveto lineto stroke grestore } bind def +/in { 1440 mul } def +/cm { 567 mul } def +/pt { 20 mul } def +/em { 120 mul } def +/sp { louts mul } def +/vs { loutv mul } def +/ft { loutf mul } def +/dg { } def + +/LoutGraphic { + /louts exch def + /loutv exch def + /loutf exch def + /ymark exch def + /xmark exch def + /ysize exch def + /xsize exch def +} def + +/LoutFont +{ findfont exch scalefont setfont +} bind def + +/LoutRecode { + { findfont dup length dict begin + {1 index /FID ne {def} {pop pop} ifelse} forall + /Encoding exch def + currentdict end definefont pop + } + stopped pop +} bind def + +/BeginEPSF { + /LoutEPSFState save def + /dict_count countdictstack def + /op_count count 1 sub def + userdict begin + /showpage { } def + 0 setgray 0 setlinecap + 1 setlinewidth 0 setlinejoin + 10 setmiterlimit [] 0 setdash newpath + /languagelevel where + { pop languagelevel + 1 ne + { false setstrokeadjust false setoverprint + } if + } if +} bind def + +/EndEPSF { + count op_count sub { pop } repeat + countdictstack dict_count sub { end } repeat + LoutEPSFState restore +} bind def +%%EndResource + +%%BeginResource encoding vec2 +/vec2 [ +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quoteright +/parenleft /parenright /asterisk /plus /comma /hyphen /period /slash +/zero /one /two /three /four /five /six /seven +/eight /nine /colon /semicolon /less /equal /greater /question +/at /A /B /C /D /E /F /G +/H /I /J /K /L /M /N /O +/P /Q /R /S /T /U /V /W +/X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore +/quoteleft /a /b /c /d /e /f /g +/h /i /j /k /l /m /n /o +/p /q /r /s /t /u /v /w +/x /y /z /braceleft /bar /braceright /asciitilde /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /quotedblleft /quotedblright /fi +/fl /endash /emdash /bullet /dagger /daggerdbl /florin /fraction +/dotlessi /grave /acute /circumflex /tilde /macron /breve /dotaccent +/dieresis /.notdef /ring /cedilla /.notdef /hungarumlaut /ogonek /caron +/space /exclamdown /cent /sterling /currency /yen /brokenbar /section +/dieresis /copyright /ordfeminine /guillemotleft /logicalnot /hyphen /registered /macron +/degree /plusminus /twosuperior /threesuperior /acute /mu /paragraph /periodcentered +/cedilla /onesuperior /ordmasculine /guillemotright /onequarter /onehalf /threequarters /questiondown +/Agrave /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla +/Egrave /Eacute /Ecircumflex /Edieresis /Igrave /Iacute /Icircumflex /Idieresis +/Eth /Ntilde /Ograve /Oacute /Ocircumflex /Otilde /Odieresis /multiply +/Oslash /Ugrave /Uacute /Ucircumflex /Udieresis /Yacute /Thorn /germandbls +/agrave /aacute /acircumflex /atilde /adieresis /aring /ae /ccedilla +/egrave /eacute /ecircumflex /edieresis /igrave /iacute /icircumflex /idieresis +/eth /ntilde /ograve /oacute /ocircumflex /otilde /odieresis /divide +/oslash /ugrave /uacute /ucircumflex /udieresis /yacute /thorn /ydieresis +] def +%%EndResource + +%%BeginResource: procset LoutMarginNotes +% @PrependGraphic file /usr/local/lib/lout/include/dl.lpg + +% path for @Box symbol +/LoutBox +{ 0 0 moveto xsize 0 lineto + xsize ysize lineto 0 ysize lineto + closepath +} def + +% path for @CurveBox symbol +/LoutCurveBox +{ xmark 0 moveto + xsize xmark sub xmark xmark 270 360 arc + xsize xmark sub ysize xmark sub xmark 0 90 arc + xmark ysize xmark sub xmark 90 180 arc + xmark xmark xmark 180 270 arc + closepath +} def + +% path for @ShadowBox symbol +/LoutShadowBox +{ xmark 2 mul 0 moveto xsize 0 lineto + xsize ysize xmark 2 mul sub lineto + xsize xmark sub ysize xmark 2 mul sub lineto + xsize xmark sub xmark lineto + xmark 2 mul xmark lineto + closepath +} def + +% set up dictionary containing margin note data: parity LoutMargSet - +/LoutMargSet +{ /LoutMargDict 12 dict def + LoutMargDict begin + /parity exch def + /matr matrix currentmatrix def + /rightx xsize def + /lefty ysize def % highest allowable point for top of next left note + /righty ysize def % highest allowable point for top of next right note + /max { 2 copy gt { pop } { exch pop } ifelse } def + /min { 2 copy lt { pop } { exch pop } ifelse } def + end +} def + +%translate coordinate system for marginal notes: type LoutMargShift - +% where type 0 is left margin, 1 is right margin, 2 is outer, 3 is inner +/LoutMargShift +{ LoutMargDict begin + + % y coordinate of top of note, in margin coords, before vertical adjust + 0 ysize transform matr itransform exch pop + + % decide whether left or right margin based on type and parity + exch [ 0 1 parity 1 parity sub ] exch get 0 eq + { + % left margin: adjust top of note downwards if overlaps previous note + lefty min + + % bottom of note is new lefty position and also translate position + ysize sub dup /lefty exch def + + % want right edge of note at coordinate zero + xsize neg exch + } + { + % right margin: adjust top of note downwards if overlaps previous note + righty min + + % bottom of note is new righty position and also translate position + ysize sub dup /righty exch def + + % want left edge of note at coordinate rightx + rightx exch + } ifelse + + % stack now contains coord of bottom left corner in margin coordinates + matr setmatrix translate + end +} def + +% create LoutPageDict with left, right, foot, top for @Place symbol users +/LoutPageSet +{ + /LoutPageDict 5 dict def + LoutPageDict begin + /matr matrix currentmatrix def + /left 0 def + /right xsize def + /foot 0 def + /top ysize def + end + +} def + +%%EndResource + +%%EndProlog + +%%BeginSetup +%%IncludeResource: font Times-Roman +/Times-Romanfnt82 vec2 /Times-Roman LoutRecode +/fnt82 { /Times-Romanfnt82 LoutFont } def +%%IncludeResource: font Helvetica +/Helveticafnt35 vec2 /Helvetica LoutRecode +/fnt35 { /Helveticafnt35 LoutFont } def +%%EndSetup + +%%Page: 15 1 +%%BeginPageSetup +%%PageResources: font Times-Roman +%%+ font Courier +%%+ font Times-Italic +/pgsave save def +%%IncludeResource: font Courier +/Courierfnt29 vec2 /Courier LoutRecode +/fnt29 { /Courierfnt29 LoutFont } def +%%IncludeResource: font Times-Italic +/Times-Italicfnt83 vec2 /Times-Italic LoutRecode +/fnt83 { /Times-Italicfnt83 LoutFont } def +0.0500 dup scale 10 setlinewidth +%%EndPageSetup +gsave +0 0 translate +320 fnt82 0.0 0.0 0.0 setrgbcolor 11900 16840 0 0 320 384 80 LoutGraphic +gsave +LoutPageSet +grestore +gsave +0 0 translate +90.0000 rotate + +grestore + +grestore +gsave +0 0 translate +90.0000 rotate +gsave +1417 -9065 translate +320 fnt82 0.0 0.0 0.0 setrgbcolor 14006 7648 0 7648 320 384 80 LoutGraphic +gsave +1 LoutMargSet +grestore +160 fnt82 0.0 0.0 0.0 setrgbcolor 13855 7538(15)m 300 fnt29 0 6924(def)m +720(fact2\(n\):)s 1440 6540(if)m 1980(n)s 2340(==)s 2880(0:)s +2880 6156(return)m 4140(1)s 1440 5772(else:)m 2880 5388(return)m 4140(reduce\(lambda)s +6660(x,y:)s 7740(x*y,)s 8640(range\(1,)s 10260(n+1\)\))s 0 4620(print)m +1080(filter\(lambda)s 3600(x:)s 4320(x)s 4680(>)s 5040(5000,)s +6120(map\(fact2,)s 8100(range\(10\)\)\))s 320 fnt83 0 4114(Merk:)m 300 fnt29 +640 3509(lambda)m 320 fnt82 1800 3500(er)m 2128(kun)s 2684(syntaktisk)s +4059(sukk)s 3(er)k 4988(for)s 5440(\345)s 5662(opprette)s +6782(funksjonsobjekt)s 8902(i)s 9062(Python.)s +grestore + +grestore + +pgsave restore +showpage + +%%Trailer +%%DocumentNeededResources: font Courier +%%+ font Helvetica +%%+ font Helvetica-Oblique +%%+ font Symbol +%%+ font Times-Roman +%%+ font Times-Italic +%%+ font Times-Bold +%%DocumentSuppliedResources: procset LoutStartUp +%%+ procset LoutMarginNotes +%%+ encoding vec2 +%%Pages: 23 +%%EOF + +postslide + +preslide +%!PS-Adobe-3.0 +%%Creator: Basser Lout Version 3.08 (May 1996) +%%CreationDate: Fri Sep 17 13:15:54 1999 +%%DocumentData: Binary +%%DocumentNeededResources: (atend) +%%DocumentSuppliedResources: (atend) +%%Pages: 1 0 +%%BoundingBox: 0 0 595 842 +%%EndComments + +%%BeginProlog +%%BeginResource: procset LoutStartUp +/m { 3 1 roll moveto show } bind def +/s { exch currentpoint exch pop moveto show } bind def +/k { exch neg 0 rmoveto show } bind def +/ul { gsave setlinewidth dup 3 1 roll + moveto lineto stroke grestore } bind def +/in { 1440 mul } def +/cm { 567 mul } def +/pt { 20 mul } def +/em { 120 mul } def +/sp { louts mul } def +/vs { loutv mul } def +/ft { loutf mul } def +/dg { } def + +/LoutGraphic { + /louts exch def + /loutv exch def + /loutf exch def + /ymark exch def + /xmark exch def + /ysize exch def + /xsize exch def +} def + +/LoutFont +{ findfont exch scalefont setfont +} bind def + +/LoutRecode { + { findfont dup length dict begin + {1 index /FID ne {def} {pop pop} ifelse} forall + /Encoding exch def + currentdict end definefont pop + } + stopped pop +} bind def + +/BeginEPSF { + /LoutEPSFState save def + /dict_count countdictstack def + /op_count count 1 sub def + userdict begin + /showpage { } def + 0 setgray 0 setlinecap + 1 setlinewidth 0 setlinejoin + 10 setmiterlimit [] 0 setdash newpath + /languagelevel where + { pop languagelevel + 1 ne + { false setstrokeadjust false setoverprint + } if + } if +} bind def + +/EndEPSF { + count op_count sub { pop } repeat + countdictstack dict_count sub { end } repeat + LoutEPSFState restore +} bind def +%%EndResource + +%%BeginResource encoding vec2 +/vec2 [ +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quoteright +/parenleft /parenright /asterisk /plus /comma /hyphen /period /slash +/zero /one /two /three /four /five /six /seven +/eight /nine /colon /semicolon /less /equal /greater /question +/at /A /B /C /D /E /F /G +/H /I /J /K /L /M /N /O +/P /Q /R /S /T /U /V /W +/X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore +/quoteleft /a /b /c /d /e /f /g +/h /i /j /k /l /m /n /o +/p /q /r /s /t /u /v /w +/x /y /z /braceleft /bar /braceright /asciitilde /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /quotedblleft /quotedblright /fi +/fl /endash /emdash /bullet /dagger /daggerdbl /florin /fraction +/dotlessi /grave /acute /circumflex /tilde /macron /breve /dotaccent +/dieresis /.notdef /ring /cedilla /.notdef /hungarumlaut /ogonek /caron +/space /exclamdown /cent /sterling /currency /yen /brokenbar /section +/dieresis /copyright /ordfeminine /guillemotleft /logicalnot /hyphen /registered /macron +/degree /plusminus /twosuperior /threesuperior /acute /mu /paragraph /periodcentered +/cedilla /onesuperior /ordmasculine /guillemotright /onequarter /onehalf /threequarters /questiondown +/Agrave /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla +/Egrave /Eacute /Ecircumflex /Edieresis /Igrave /Iacute /Icircumflex /Idieresis +/Eth /Ntilde /Ograve /Oacute /Ocircumflex /Otilde /Odieresis /multiply +/Oslash /Ugrave /Uacute /Ucircumflex /Udieresis /Yacute /Thorn /germandbls +/agrave /aacute /acircumflex /atilde /adieresis /aring /ae /ccedilla +/egrave /eacute /ecircumflex /edieresis /igrave /iacute /icircumflex /idieresis +/eth /ntilde /ograve /oacute /ocircumflex /otilde /odieresis /divide +/oslash /ugrave /uacute /ucircumflex /udieresis /yacute /thorn /ydieresis +] def +%%EndResource + +%%BeginResource: procset LoutMarginNotes +% @PrependGraphic file /usr/local/lib/lout/include/dl.lpg + +% path for @Box symbol +/LoutBox +{ 0 0 moveto xsize 0 lineto + xsize ysize lineto 0 ysize lineto + closepath +} def + +% path for @CurveBox symbol +/LoutCurveBox +{ xmark 0 moveto + xsize xmark sub xmark xmark 270 360 arc + xsize xmark sub ysize xmark sub xmark 0 90 arc + xmark ysize xmark sub xmark 90 180 arc + xmark xmark xmark 180 270 arc + closepath +} def + +% path for @ShadowBox symbol +/LoutShadowBox +{ xmark 2 mul 0 moveto xsize 0 lineto + xsize ysize xmark 2 mul sub lineto + xsize xmark sub ysize xmark 2 mul sub lineto + xsize xmark sub xmark lineto + xmark 2 mul xmark lineto + closepath +} def + +% set up dictionary containing margin note data: parity LoutMargSet - +/LoutMargSet +{ /LoutMargDict 12 dict def + LoutMargDict begin + /parity exch def + /matr matrix currentmatrix def + /rightx xsize def + /lefty ysize def % highest allowable point for top of next left note + /righty ysize def % highest allowable point for top of next right note + /max { 2 copy gt { pop } { exch pop } ifelse } def + /min { 2 copy lt { pop } { exch pop } ifelse } def + end +} def + +%translate coordinate system for marginal notes: type LoutMargShift - +% where type 0 is left margin, 1 is right margin, 2 is outer, 3 is inner +/LoutMargShift +{ LoutMargDict begin + + % y coordinate of top of note, in margin coords, before vertical adjust + 0 ysize transform matr itransform exch pop + + % decide whether left or right margin based on type and parity + exch [ 0 1 parity 1 parity sub ] exch get 0 eq + { + % left margin: adjust top of note downwards if overlaps previous note + lefty min + + % bottom of note is new lefty position and also translate position + ysize sub dup /lefty exch def + + % want right edge of note at coordinate zero + xsize neg exch + } + { + % right margin: adjust top of note downwards if overlaps previous note + righty min + + % bottom of note is new righty position and also translate position + ysize sub dup /righty exch def + + % want left edge of note at coordinate rightx + rightx exch + } ifelse + + % stack now contains coord of bottom left corner in margin coordinates + matr setmatrix translate + end +} def + +% create LoutPageDict with left, right, foot, top for @Place symbol users +/LoutPageSet +{ + /LoutPageDict 5 dict def + LoutPageDict begin + /matr matrix currentmatrix def + /left 0 def + /right xsize def + /foot 0 def + /top ysize def + end + +} def + +%%EndResource + +%%EndProlog + +%%BeginSetup +%%IncludeResource: font Times-Roman +/Times-Romanfnt82 vec2 /Times-Roman LoutRecode +/fnt82 { /Times-Romanfnt82 LoutFont } def +%%IncludeResource: font Helvetica +/Helveticafnt35 vec2 /Helvetica LoutRecode +/fnt35 { /Helveticafnt35 LoutFont } def +%%EndSetup + +%%Page: 16 1 +%%BeginPageSetup +%%PageResources: font Times-Roman +%%+ font Times-Bold +%%+ font Courier +%%+ font Times-Italic +/pgsave save def +%%IncludeResource: font Times-Bold +/Times-Boldfnt84 vec2 /Times-Bold LoutRecode +/fnt84 { /Times-Boldfnt84 LoutFont } def +%%IncludeResource: font Courier +/Courierfnt29 vec2 /Courier LoutRecode +/fnt29 { /Courierfnt29 LoutFont } def +%%IncludeResource: font Times-Italic +/Times-Italicfnt83 vec2 /Times-Italic LoutRecode +/fnt83 { /Times-Italicfnt83 LoutFont } def +0.0500 dup scale 10 setlinewidth +%%EndPageSetup +gsave +0 0 translate +320 fnt82 0.0 0.0 0.0 setrgbcolor 11900 16840 0 0 320 384 80 LoutGraphic +gsave +LoutPageSet +grestore +gsave +0 0 translate +90.0000 rotate + +grestore + +grestore +gsave +0 0 translate +90.0000 rotate +gsave +1417 -9065 translate +320 fnt82 0.0 0.0 0.0 setrgbcolor 14006 7648 0 7648 320 384 80 LoutGraphic +gsave +0 LoutMargSet +grestore +160 fnt82 0.0 0.0 0.0 setrgbcolor 13851 7539(16)m 320 fnt84 5181 6508(Klasser)m 29(,)k +6332(objekt)s 7280(og)s 7675(metodar)s 300 fnt29 0 5871(class)m +1080(eksempel:)s 1440 5487(fotpistol)m 3240(=)s 3600([])s 1440 5103(def)m +2160(__init__\(self,)s 4860(data\):)s 2880 4719(self.data)m 4680(=)s 5040(data)s +1440 4335(def)m 2160(skyt\(self\):)s 2880 3951(print)m 3960(self.fotpistol)s 1440 3567(def)m +2160(lad\(self,)s 3960(kule\):)s 2880 3183(self.fotpistol.append\(kule\))m 0 2799(ammunisjon)m 1980(=)s +2340(eksempel\("Det meste g\345r."\))s 0 2415(fot)m 720(=)s 1080(eksempel\(42\))s 0 2031(ammunisjon.lad\(1\))m +0 1647(fot.lad\(2\))m 0 1263(fot.skyt\(\))m 320 fnt83 0 757(Merk:)m 300 fnt29 +640 161(fot.skyt)m 320 fnt82 2160 152(sist)m 2664(i)s 2824(eksempelet)s +4340(vil)s 4750(skri)s 8(v)k 4(e)k 5592(ut)s +300 fnt29 5920 161([1,)m 6640(2])s 320 fnt82 7080 152(sia)m +7514(lister)s 8230(er)s 8558(v)s 8(ariable)k 9652(objekt)s +10530(og)s 10921(metoden)s 12097(lad)s 12565(kun)s 13121(har)s + +grestore + +grestore + +pgsave restore +showpage + +%%Trailer +%%DocumentNeededResources: font Courier +%%+ font Helvetica +%%+ font Helvetica-Oblique +%%+ font Symbol +%%+ font Times-Roman +%%+ font Times-Italic +%%+ font Times-Bold +%%DocumentSuppliedResources: procset LoutStartUp +%%+ procset LoutMarginNotes +%%+ encoding vec2 +%%Pages: 23 +%%EOF + +postslide + +%%Page: 9 12 +%%BeginPageSetup +save +%%EndPageSetup + +preslide +%!PS-Adobe-3.0 +%%Creator: Basser Lout Version 3.08 (May 1996) +%%CreationDate: Fri Sep 17 13:15:54 1999 +%%DocumentData: Binary +%%DocumentNeededResources: (atend) +%%DocumentSuppliedResources: (atend) +%%Pages: 1 0 +%%BoundingBox: 0 0 595 842 +%%EndComments + +%%BeginProlog +%%BeginResource: procset LoutStartUp +/m { 3 1 roll moveto show } bind def +/s { exch currentpoint exch pop moveto show } bind def +/k { exch neg 0 rmoveto show } bind def +/ul { gsave setlinewidth dup 3 1 roll + moveto lineto stroke grestore } bind def +/in { 1440 mul } def +/cm { 567 mul } def +/pt { 20 mul } def +/em { 120 mul } def +/sp { louts mul } def +/vs { loutv mul } def +/ft { loutf mul } def +/dg { } def + +/LoutGraphic { + /louts exch def + /loutv exch def + /loutf exch def + /ymark exch def + /xmark exch def + /ysize exch def + /xsize exch def +} def + +/LoutFont +{ findfont exch scalefont setfont +} bind def + +/LoutRecode { + { findfont dup length dict begin + {1 index /FID ne {def} {pop pop} ifelse} forall + /Encoding exch def + currentdict end definefont pop + } + stopped pop +} bind def + +/BeginEPSF { + /LoutEPSFState save def + /dict_count countdictstack def + /op_count count 1 sub def + userdict begin + /showpage { } def + 0 setgray 0 setlinecap + 1 setlinewidth 0 setlinejoin + 10 setmiterlimit [] 0 setdash newpath + /languagelevel where + { pop languagelevel + 1 ne + { false setstrokeadjust false setoverprint + } if + } if +} bind def + +/EndEPSF { + count op_count sub { pop } repeat + countdictstack dict_count sub { end } repeat + LoutEPSFState restore +} bind def +%%EndResource + +%%BeginResource encoding vec2 +/vec2 [ +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quoteright +/parenleft /parenright /asterisk /plus /comma /hyphen /period /slash +/zero /one /two /three /four /five /six /seven +/eight /nine /colon /semicolon /less /equal /greater /question +/at /A /B /C /D /E /F /G +/H /I /J /K /L /M /N /O +/P /Q /R /S /T /U /V /W +/X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore +/quoteleft /a /b /c /d /e /f /g +/h /i /j /k /l /m /n /o +/p /q /r /s /t /u /v /w +/x /y /z /braceleft /bar /braceright /asciitilde /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /quotedblleft /quotedblright /fi +/fl /endash /emdash /bullet /dagger /daggerdbl /florin /fraction +/dotlessi /grave /acute /circumflex /tilde /macron /breve /dotaccent +/dieresis /.notdef /ring /cedilla /.notdef /hungarumlaut /ogonek /caron +/space /exclamdown /cent /sterling /currency /yen /brokenbar /section +/dieresis /copyright /ordfeminine /guillemotleft /logicalnot /hyphen /registered /macron +/degree /plusminus /twosuperior /threesuperior /acute /mu /paragraph /periodcentered +/cedilla /onesuperior /ordmasculine /guillemotright /onequarter /onehalf /threequarters /questiondown +/Agrave /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla +/Egrave /Eacute /Ecircumflex /Edieresis /Igrave /Iacute /Icircumflex /Idieresis +/Eth /Ntilde /Ograve /Oacute /Ocircumflex /Otilde /Odieresis /multiply +/Oslash /Ugrave /Uacute /Ucircumflex /Udieresis /Yacute /Thorn /germandbls +/agrave /aacute /acircumflex /atilde /adieresis /aring /ae /ccedilla +/egrave /eacute /ecircumflex /edieresis /igrave /iacute /icircumflex /idieresis +/eth /ntilde /ograve /oacute /ocircumflex /otilde /odieresis /divide +/oslash /ugrave /uacute /ucircumflex /udieresis /yacute /thorn /ydieresis +] def +%%EndResource + +%%BeginResource: procset LoutMarginNotes +% @PrependGraphic file /usr/local/lib/lout/include/dl.lpg + +% path for @Box symbol +/LoutBox +{ 0 0 moveto xsize 0 lineto + xsize ysize lineto 0 ysize lineto + closepath +} def + +% path for @CurveBox symbol +/LoutCurveBox +{ xmark 0 moveto + xsize xmark sub xmark xmark 270 360 arc + xsize xmark sub ysize xmark sub xmark 0 90 arc + xmark ysize xmark sub xmark 90 180 arc + xmark xmark xmark 180 270 arc + closepath +} def + +% path for @ShadowBox symbol +/LoutShadowBox +{ xmark 2 mul 0 moveto xsize 0 lineto + xsize ysize xmark 2 mul sub lineto + xsize xmark sub ysize xmark 2 mul sub lineto + xsize xmark sub xmark lineto + xmark 2 mul xmark lineto + closepath +} def + +% set up dictionary containing margin note data: parity LoutMargSet - +/LoutMargSet +{ /LoutMargDict 12 dict def + LoutMargDict begin + /parity exch def + /matr matrix currentmatrix def + /rightx xsize def + /lefty ysize def % highest allowable point for top of next left note + /righty ysize def % highest allowable point for top of next right note + /max { 2 copy gt { pop } { exch pop } ifelse } def + /min { 2 copy lt { pop } { exch pop } ifelse } def + end +} def + +%translate coordinate system for marginal notes: type LoutMargShift - +% where type 0 is left margin, 1 is right margin, 2 is outer, 3 is inner +/LoutMargShift +{ LoutMargDict begin + + % y coordinate of top of note, in margin coords, before vertical adjust + 0 ysize transform matr itransform exch pop + + % decide whether left or right margin based on type and parity + exch [ 0 1 parity 1 parity sub ] exch get 0 eq + { + % left margin: adjust top of note downwards if overlaps previous note + lefty min + + % bottom of note is new lefty position and also translate position + ysize sub dup /lefty exch def + + % want right edge of note at coordinate zero + xsize neg exch + } + { + % right margin: adjust top of note downwards if overlaps previous note + righty min + + % bottom of note is new righty position and also translate position + ysize sub dup /righty exch def + + % want left edge of note at coordinate rightx + rightx exch + } ifelse + + % stack now contains coord of bottom left corner in margin coordinates + matr setmatrix translate + end +} def + +% create LoutPageDict with left, right, foot, top for @Place symbol users +/LoutPageSet +{ + /LoutPageDict 5 dict def + LoutPageDict begin + /matr matrix currentmatrix def + /left 0 def + /right xsize def + /foot 0 def + /top ysize def + end + +} def + +%%EndResource + +%%EndProlog + +%%BeginSetup +%%IncludeResource: font Times-Roman +/Times-Romanfnt82 vec2 /Times-Roman LoutRecode +/fnt82 { /Times-Romanfnt82 LoutFont } def +%%IncludeResource: font Helvetica +/Helveticafnt35 vec2 /Helvetica LoutRecode +/fnt35 { /Helveticafnt35 LoutFont } def +%%EndSetup + +%%Page: 17 1 +%%BeginPageSetup +%%PageResources: font Times-Roman +%%+ font Courier +/pgsave save def +%%IncludeResource: font Courier +/Courierfnt29 vec2 /Courier LoutRecode +/fnt29 { /Courierfnt29 LoutFont } def +0.0500 dup scale 10 setlinewidth +%%EndPageSetup +gsave +0 0 translate +320 fnt82 0.0 0.0 0.0 setrgbcolor 11900 16840 0 0 320 384 80 LoutGraphic +gsave +LoutPageSet +grestore +gsave +0 0 translate +90.0000 rotate + +grestore + +grestore +gsave +0 0 translate +90.0000 rotate +gsave +1417 -9065 translate +320 fnt82 0.0 0.0 0.0 setrgbcolor 14006 7648 0 7648 320 384 80 LoutGraphic +gsave +1 LoutMargSet +grestore +160 fnt82 0.0 0.0 0.0 setrgbcolor 13854 7540(17)m 320 fnt82 640 6896(aksessert)m +1872(klasse-attrib)s 6(utten)k 300 fnt29 4138 6905(fotpistol)m 320 fnt82 +5758 6896(.)m 5896(Hadde)s 6805(de\207nisjonen)s 8442(a)s 6(v)k +300 fnt29 8811 6905(fotpistol)m 320 fnt82 10511 6896(v)m 6(orte)k +11235(\210ytta)s 11970(til)s 300 fnt29 12308 6905(__init__)m 320 fnt82 +640 6512(ville)m 1280(problemet)s 2654(ha)s 3036(v)s 6(orte)k +3760(unng)s 1(\345tt.)k 640 5832(Ein)m 1157(kan)s 1692(di)s 8(v)k 4(erre)k +2656(ikkje)s 3365(arv)s 4(e)k 3983(fr\345)s 4414(typar)s +5148(i)s 5305(Python.)s 6426(\(Det)s 7070(\207nst)s 7697(l\370ysning)s 1(ar)k +9121(for)s 9571(dette,)s 10331(og)s 10720(problemet)s 12091(vil)s +12499(ikkje)s 13208(lenger)s 640 5448(v)m 4(era)k 1266(aktuelt)s +2214(i)s 2374(Python)s 3355(2.0.\))s 640 4761(\330nsk)m 3(er)k +1636(ein)s 2097(\345)s 2314(de\207nere)s 3412(ei)s 3709(klasse)s +4558(som)s 5165(arv)s 4(er)k 5893(fr\345)s 6322(andre)s +7101(klasser:)s 300 fnt29 8203 4770(class)m 9278(namn\(Base1[,)s 11613(Base2,)s +12868(...]\):)s 320 fnt82 13948 4761(.)m 640 4377(S\370k)m 3(erekk)k 3(ef\370lgen)k +2875(er)s 3203(\253depth)s 4149(\207rsth,)s 4947(left)s 5451(to)s +5770(right.\273)s 640 3697(Operatoro)m 4(v)k 4(erloading)k 3364(skjer)s +4064(v)s 4(ed)k 4600(\345)s 4822(de\207nere)s 5925(metodar)s +7051(med)s 7679(gitte)s 8319(namn,)s 9172(td)s 300 fnt29 +9498 3706(__add__)m 320 fnt82 10758 3697(.)m +grestore + +grestore + +pgsave restore +showpage + +%%Trailer +%%DocumentNeededResources: font Courier +%%+ font Helvetica +%%+ font Helvetica-Oblique +%%+ font Symbol +%%+ font Times-Roman +%%+ font Times-Italic +%%+ font Times-Bold +%%DocumentSuppliedResources: procset LoutStartUp +%%+ procset LoutMarginNotes +%%+ encoding vec2 +%%Pages: 23 +%%EOF + +postslide + +preslide +%!PS-Adobe-3.0 +%%Creator: Basser Lout Version 3.08 (May 1996) +%%CreationDate: Fri Sep 17 13:15:54 1999 +%%DocumentData: Binary +%%DocumentNeededResources: (atend) +%%DocumentSuppliedResources: (atend) +%%Pages: 1 0 +%%BoundingBox: 0 0 595 842 +%%EndComments + +%%BeginProlog +%%BeginResource: procset LoutStartUp +/m { 3 1 roll moveto show } bind def +/s { exch currentpoint exch pop moveto show } bind def +/k { exch neg 0 rmoveto show } bind def +/ul { gsave setlinewidth dup 3 1 roll + moveto lineto stroke grestore } bind def +/in { 1440 mul } def +/cm { 567 mul } def +/pt { 20 mul } def +/em { 120 mul } def +/sp { louts mul } def +/vs { loutv mul } def +/ft { loutf mul } def +/dg { } def + +/LoutGraphic { + /louts exch def + /loutv exch def + /loutf exch def + /ymark exch def + /xmark exch def + /ysize exch def + /xsize exch def +} def + +/LoutFont +{ findfont exch scalefont setfont +} bind def + +/LoutRecode { + { findfont dup length dict begin + {1 index /FID ne {def} {pop pop} ifelse} forall + /Encoding exch def + currentdict end definefont pop + } + stopped pop +} bind def + +/BeginEPSF { + /LoutEPSFState save def + /dict_count countdictstack def + /op_count count 1 sub def + userdict begin + /showpage { } def + 0 setgray 0 setlinecap + 1 setlinewidth 0 setlinejoin + 10 setmiterlimit [] 0 setdash newpath + /languagelevel where + { pop languagelevel + 1 ne + { false setstrokeadjust false setoverprint + } if + } if +} bind def + +/EndEPSF { + count op_count sub { pop } repeat + countdictstack dict_count sub { end } repeat + LoutEPSFState restore +} bind def +%%EndResource + +%%BeginResource encoding vec2 +/vec2 [ +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quoteright +/parenleft /parenright /asterisk /plus /comma /hyphen /period /slash +/zero /one /two /three /four /five /six /seven +/eight /nine /colon /semicolon /less /equal /greater /question +/at /A /B /C /D /E /F /G +/H /I /J /K /L /M /N /O +/P /Q /R /S /T /U /V /W +/X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore +/quoteleft /a /b /c /d /e /f /g +/h /i /j /k /l /m /n /o +/p /q /r /s /t /u /v /w +/x /y /z /braceleft /bar /braceright /asciitilde /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /quotedblleft /quotedblright /fi +/fl /endash /emdash /bullet /dagger /daggerdbl /florin /fraction +/dotlessi /grave /acute /circumflex /tilde /macron /breve /dotaccent +/dieresis /.notdef /ring /cedilla /.notdef /hungarumlaut /ogonek /caron +/space /exclamdown /cent /sterling /currency /yen /brokenbar /section +/dieresis /copyright /ordfeminine /guillemotleft /logicalnot /hyphen /registered /macron +/degree /plusminus /twosuperior /threesuperior /acute /mu /paragraph /periodcentered +/cedilla /onesuperior /ordmasculine /guillemotright /onequarter /onehalf /threequarters /questiondown +/Agrave /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla +/Egrave /Eacute /Ecircumflex /Edieresis /Igrave /Iacute /Icircumflex /Idieresis +/Eth /Ntilde /Ograve /Oacute /Ocircumflex /Otilde /Odieresis /multiply +/Oslash /Ugrave /Uacute /Ucircumflex /Udieresis /Yacute /Thorn /germandbls +/agrave /aacute /acircumflex /atilde /adieresis /aring /ae /ccedilla +/egrave /eacute /ecircumflex /edieresis /igrave /iacute /icircumflex /idieresis +/eth /ntilde /ograve /oacute /ocircumflex /otilde /odieresis /divide +/oslash /ugrave /uacute /ucircumflex /udieresis /yacute /thorn /ydieresis +] def +%%EndResource + +%%BeginResource: procset LoutMarginNotes +% @PrependGraphic file /usr/local/lib/lout/include/dl.lpg + +% path for @Box symbol +/LoutBox +{ 0 0 moveto xsize 0 lineto + xsize ysize lineto 0 ysize lineto + closepath +} def + +% path for @CurveBox symbol +/LoutCurveBox +{ xmark 0 moveto + xsize xmark sub xmark xmark 270 360 arc + xsize xmark sub ysize xmark sub xmark 0 90 arc + xmark ysize xmark sub xmark 90 180 arc + xmark xmark xmark 180 270 arc + closepath +} def + +% path for @ShadowBox symbol +/LoutShadowBox +{ xmark 2 mul 0 moveto xsize 0 lineto + xsize ysize xmark 2 mul sub lineto + xsize xmark sub ysize xmark 2 mul sub lineto + xsize xmark sub xmark lineto + xmark 2 mul xmark lineto + closepath +} def + +% set up dictionary containing margin note data: parity LoutMargSet - +/LoutMargSet +{ /LoutMargDict 12 dict def + LoutMargDict begin + /parity exch def + /matr matrix currentmatrix def + /rightx xsize def + /lefty ysize def % highest allowable point for top of next left note + /righty ysize def % highest allowable point for top of next right note + /max { 2 copy gt { pop } { exch pop } ifelse } def + /min { 2 copy lt { pop } { exch pop } ifelse } def + end +} def + +%translate coordinate system for marginal notes: type LoutMargShift - +% where type 0 is left margin, 1 is right margin, 2 is outer, 3 is inner +/LoutMargShift +{ LoutMargDict begin + + % y coordinate of top of note, in margin coords, before vertical adjust + 0 ysize transform matr itransform exch pop + + % decide whether left or right margin based on type and parity + exch [ 0 1 parity 1 parity sub ] exch get 0 eq + { + % left margin: adjust top of note downwards if overlaps previous note + lefty min + + % bottom of note is new lefty position and also translate position + ysize sub dup /lefty exch def + + % want right edge of note at coordinate zero + xsize neg exch + } + { + % right margin: adjust top of note downwards if overlaps previous note + righty min + + % bottom of note is new righty position and also translate position + ysize sub dup /righty exch def + + % want left edge of note at coordinate rightx + rightx exch + } ifelse + + % stack now contains coord of bottom left corner in margin coordinates + matr setmatrix translate + end +} def + +% create LoutPageDict with left, right, foot, top for @Place symbol users +/LoutPageSet +{ + /LoutPageDict 5 dict def + LoutPageDict begin + /matr matrix currentmatrix def + /left 0 def + /right xsize def + /foot 0 def + /top ysize def + end + +} def + +%%EndResource + +%%EndProlog + +%%BeginSetup +%%IncludeResource: font Times-Roman +/Times-Romanfnt82 vec2 /Times-Roman LoutRecode +/fnt82 { /Times-Romanfnt82 LoutFont } def +%%IncludeResource: font Helvetica +/Helveticafnt35 vec2 /Helvetica LoutRecode +/fnt35 { /Helveticafnt35 LoutFont } def +%%EndSetup + +%%Page: 18 1 +%%BeginPageSetup +%%PageResources: font Times-Roman +%%+ font Times-Bold +%%+ font Courier +/pgsave save def +%%IncludeResource: font Times-Bold +/Times-Boldfnt84 vec2 /Times-Bold LoutRecode +/fnt84 { /Times-Boldfnt84 LoutFont } def +%%IncludeResource: font Courier +/Courierfnt29 vec2 /Courier LoutRecode +/fnt29 { /Courierfnt29 LoutFont } def +0.0500 dup scale 10 setlinewidth +%%EndPageSetup +gsave +0 0 translate +320 fnt82 0.0 0.0 0.0 setrgbcolor 11900 16840 0 0 320 384 80 LoutGraphic +gsave +LoutPageSet +grestore +gsave +0 0 translate +90.0000 rotate + +grestore + +grestore +gsave +0 0 translate +90.0000 rotate +gsave +1417 -9065 translate +320 fnt82 0.0 0.0 0.0 setrgbcolor 14006 7648 0 7648 320 384 80 LoutGraphic +gsave +0 LoutMargSet +grestore +160 fnt82 0.0 0.0 0.0 setrgbcolor 13854 7540(18)m 320 fnt84 5487 6509(Namner)m 5(om)k +7100(og)s 7495(scoping)s 320 fnt82 0 5841(Python)m 981(er)s +1309(\253statisk)s 2364(sk)s 3(opa.\273)k 3414(Alle)s 4037(symboloppslag)s +6042(v)s 4(ert)k 6614(gjort)s 7296(i)s 7456(f\370lg)s 1(ande)k +8647(rekk)s 3(ef\370lge:)k 0 5170(1.)m 640(Lokalt)s 1553(namnerom.)s +3137(Symbol)s 4204(de\207nert)s 5259(innafor)s 6261(same)s 6991(metode)s +8005(eller)s 8651(funksjon.)s 0 4499(2.)m 640(Globalt)s 1677(namnerom)s +3123(for)s 3575(den)s 4113(aktuelle)s 5197(modulen.)s 0 3893(3.)m +640(Innebygde)s 2064(funksjonar)s 17(.)k 300 fnt29 0 3244(#)m +360(Denne)s 1440(koden)s 2520(vil)s 3240(ikkje)s 4320(fungere)s +0 2860(a)m 360(=)s 720(12)s 0 2476(def)m 720(nokon_liker_basic\(\):)s +1440 2092(print)m 2520(a)s 1440 1708(a)m 1800(=)s 2160(0)s +320 fnt82 0 1200(Eksempelet)m 1569(o)s 4(v)k 8(anfor)k +2631(fungerer)s 3793(ikkje)s 4505(a)s 6(v)k 4874(di)s +5194(Python)s 6175(ser)s 6627(tilordning)s 1(a)k 8106(i)s +8266(funksjonsde\207nisjonen)s 11145(og)s 11536(g)s 1(\345r)k 12023(ut)s +12351(i)s 12511(fr\345)s 12945(at)s 300 fnt29 13255 1209(a)m +320 fnt82 13515 1200(er)m 0 816(ein)m 466(lokal)s 1178(v)s 8(ariabel.)k +2416(N\345r)s 2975(funksjonen)s 4471(s\345)s 4817(pr\370v)s 4(er)k +5727(\345)s 5949(skri)s 8(v)k 4(e)k 6791(ut)s +300 fnt29 7119 825(a)m 320 fnt82 7379 816(f\370r)m 7831(han)s +8369(er)s 8697(tilordna)s 9769(f\370rer)s 10469(dette)s 11163(til)s +11501(ein)s 11967(feil.)s 12609(I)s 12790(tille)s 4(gg)k +13671(vil)s 0 432(heller)m 806(ikkje)s 1518(den)s 2056(globale)s +3070(referansen)s 300 fnt29 4476 441(a)m 320 fnt82 4736 432(v)m 4(erte)k +5444(oppdatert)s 6730(til)s 7068(0,)s 7371(sj\370lv)s 8064(om)s +8552(ein)s 9018(ikkje)s 9730(hadde)s 10568(hatt)s 11126(ein)s +11592(funksjon)s 12786(som)s 13398(f\370rte)s +grestore + +grestore + +pgsave restore +showpage + +%%Trailer +%%DocumentNeededResources: font Courier +%%+ font Helvetica +%%+ font Helvetica-Oblique +%%+ font Symbol +%%+ font Times-Roman +%%+ font Times-Italic +%%+ font Times-Bold +%%DocumentSuppliedResources: procset LoutStartUp +%%+ procset LoutMarginNotes +%%+ encoding vec2 +%%Pages: 23 +%%EOF + +postslide + +%%Page: 10 12 +%%BeginPageSetup +save +%%EndPageSetup + +preslide +%!PS-Adobe-3.0 +%%Creator: Basser Lout Version 3.08 (May 1996) +%%CreationDate: Fri Sep 17 13:15:54 1999 +%%DocumentData: Binary +%%DocumentNeededResources: (atend) +%%DocumentSuppliedResources: (atend) +%%Pages: 1 0 +%%BoundingBox: 0 0 595 842 +%%EndComments + +%%BeginProlog +%%BeginResource: procset LoutStartUp +/m { 3 1 roll moveto show } bind def +/s { exch currentpoint exch pop moveto show } bind def +/k { exch neg 0 rmoveto show } bind def +/ul { gsave setlinewidth dup 3 1 roll + moveto lineto stroke grestore } bind def +/in { 1440 mul } def +/cm { 567 mul } def +/pt { 20 mul } def +/em { 120 mul } def +/sp { louts mul } def +/vs { loutv mul } def +/ft { loutf mul } def +/dg { } def + +/LoutGraphic { + /louts exch def + /loutv exch def + /loutf exch def + /ymark exch def + /xmark exch def + /ysize exch def + /xsize exch def +} def + +/LoutFont +{ findfont exch scalefont setfont +} bind def + +/LoutRecode { + { findfont dup length dict begin + {1 index /FID ne {def} {pop pop} ifelse} forall + /Encoding exch def + currentdict end definefont pop + } + stopped pop +} bind def + +/BeginEPSF { + /LoutEPSFState save def + /dict_count countdictstack def + /op_count count 1 sub def + userdict begin + /showpage { } def + 0 setgray 0 setlinecap + 1 setlinewidth 0 setlinejoin + 10 setmiterlimit [] 0 setdash newpath + /languagelevel where + { pop languagelevel + 1 ne + { false setstrokeadjust false setoverprint + } if + } if +} bind def + +/EndEPSF { + count op_count sub { pop } repeat + countdictstack dict_count sub { end } repeat + LoutEPSFState restore +} bind def +%%EndResource + +%%BeginResource encoding vec2 +/vec2 [ +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quoteright +/parenleft /parenright /asterisk /plus /comma /hyphen /period /slash +/zero /one /two /three /four /five /six /seven +/eight /nine /colon /semicolon /less /equal /greater /question +/at /A /B /C /D /E /F /G +/H /I /J /K /L /M /N /O +/P /Q /R /S /T /U /V /W +/X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore +/quoteleft /a /b /c /d /e /f /g +/h /i /j /k /l /m /n /o +/p /q /r /s /t /u /v /w +/x /y /z /braceleft /bar /braceright /asciitilde /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /quotedblleft /quotedblright /fi +/fl /endash /emdash /bullet /dagger /daggerdbl /florin /fraction +/dotlessi /grave /acute /circumflex /tilde /macron /breve /dotaccent +/dieresis /.notdef /ring /cedilla /.notdef /hungarumlaut /ogonek /caron +/space /exclamdown /cent /sterling /currency /yen /brokenbar /section +/dieresis /copyright /ordfeminine /guillemotleft /logicalnot /hyphen /registered /macron +/degree /plusminus /twosuperior /threesuperior /acute /mu /paragraph /periodcentered +/cedilla /onesuperior /ordmasculine /guillemotright /onequarter /onehalf /threequarters /questiondown +/Agrave /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla +/Egrave /Eacute /Ecircumflex /Edieresis /Igrave /Iacute /Icircumflex /Idieresis +/Eth /Ntilde /Ograve /Oacute /Ocircumflex /Otilde /Odieresis /multiply +/Oslash /Ugrave /Uacute /Ucircumflex /Udieresis /Yacute /Thorn /germandbls +/agrave /aacute /acircumflex /atilde /adieresis /aring /ae /ccedilla +/egrave /eacute /ecircumflex /edieresis /igrave /iacute /icircumflex /idieresis +/eth /ntilde /ograve /oacute /ocircumflex /otilde /odieresis /divide +/oslash /ugrave /uacute /ucircumflex /udieresis /yacute /thorn /ydieresis +] def +%%EndResource + +%%BeginResource: procset LoutMarginNotes +% @PrependGraphic file /usr/local/lib/lout/include/dl.lpg + +% path for @Box symbol +/LoutBox +{ 0 0 moveto xsize 0 lineto + xsize ysize lineto 0 ysize lineto + closepath +} def + +% path for @CurveBox symbol +/LoutCurveBox +{ xmark 0 moveto + xsize xmark sub xmark xmark 270 360 arc + xsize xmark sub ysize xmark sub xmark 0 90 arc + xmark ysize xmark sub xmark 90 180 arc + xmark xmark xmark 180 270 arc + closepath +} def + +% path for @ShadowBox symbol +/LoutShadowBox +{ xmark 2 mul 0 moveto xsize 0 lineto + xsize ysize xmark 2 mul sub lineto + xsize xmark sub ysize xmark 2 mul sub lineto + xsize xmark sub xmark lineto + xmark 2 mul xmark lineto + closepath +} def + +% set up dictionary containing margin note data: parity LoutMargSet - +/LoutMargSet +{ /LoutMargDict 12 dict def + LoutMargDict begin + /parity exch def + /matr matrix currentmatrix def + /rightx xsize def + /lefty ysize def % highest allowable point for top of next left note + /righty ysize def % highest allowable point for top of next right note + /max { 2 copy gt { pop } { exch pop } ifelse } def + /min { 2 copy lt { pop } { exch pop } ifelse } def + end +} def + +%translate coordinate system for marginal notes: type LoutMargShift - +% where type 0 is left margin, 1 is right margin, 2 is outer, 3 is inner +/LoutMargShift +{ LoutMargDict begin + + % y coordinate of top of note, in margin coords, before vertical adjust + 0 ysize transform matr itransform exch pop + + % decide whether left or right margin based on type and parity + exch [ 0 1 parity 1 parity sub ] exch get 0 eq + { + % left margin: adjust top of note downwards if overlaps previous note + lefty min + + % bottom of note is new lefty position and also translate position + ysize sub dup /lefty exch def + + % want right edge of note at coordinate zero + xsize neg exch + } + { + % right margin: adjust top of note downwards if overlaps previous note + righty min + + % bottom of note is new righty position and also translate position + ysize sub dup /righty exch def + + % want left edge of note at coordinate rightx + rightx exch + } ifelse + + % stack now contains coord of bottom left corner in margin coordinates + matr setmatrix translate + end +} def + +% create LoutPageDict with left, right, foot, top for @Place symbol users +/LoutPageSet +{ + /LoutPageDict 5 dict def + LoutPageDict begin + /matr matrix currentmatrix def + /left 0 def + /right xsize def + /foot 0 def + /top ysize def + end + +} def + +%%EndResource + +%%EndProlog + +%%BeginSetup +%%IncludeResource: font Times-Roman +/Times-Romanfnt82 vec2 /Times-Roman LoutRecode +/fnt82 { /Times-Romanfnt82 LoutFont } def +%%IncludeResource: font Helvetica +/Helveticafnt35 vec2 /Helvetica LoutRecode +/fnt35 { /Helveticafnt35 LoutFont } def +%%EndSetup + +%%Page: 19 1 +%%BeginPageSetup +%%PageResources: font Times-Roman +%%+ font Times-Italic +%%+ font Courier +/pgsave save def +%%IncludeResource: font Times-Italic +/Times-Italicfnt83 vec2 /Times-Italic LoutRecode +/fnt83 { /Times-Italicfnt83 LoutFont } def +%%IncludeResource: font Courier +/Courierfnt29 vec2 /Courier LoutRecode +/fnt29 { /Courierfnt29 LoutFont } def +0.0500 dup scale 10 setlinewidth +%%EndPageSetup +gsave +0 0 translate +320 fnt82 0.0 0.0 0.0 setrgbcolor 11900 16840 0 0 320 384 80 LoutGraphic +gsave +LoutPageSet +grestore +gsave +0 0 translate +90.0000 rotate + +grestore + +grestore +gsave +0 0 translate +90.0000 rotate +gsave +1417 -9065 translate +320 fnt82 0.0 0.0 0.0 setrgbcolor 14006 7648 0 7648 320 384 80 LoutGraphic +gsave +1 LoutMargSet +grestore +160 fnt82 0.0 0.0 0.0 setrgbcolor 13852 7540(19)m 320 fnt82 0 6885(til)m +338(at)s 648(funksjonen)s 2144(ikkje)s 2856(v)s 8(art)k +3424(ferdig)s 4257(utf\370rt)s 5045(f\370r)s 5497(ein)s 5963(k)s 3(om)k +6608(til)s 6946(tilordning)s 1(a.)k 8563(Om)s 9122(ein)s +9588(f)s 3(aktisk)k 320 fnt83 10534 6887(vil)m 320 fnt82 +10932 6885(gjera)m 11650(slik)s 3(e)k 12323(ting,)s 12962(m\345)s +13432(ein)s 0 6501(gjera)m 718(som)s 1330(f\370lg)s 1(ande:)k +300 fnt29 0 6126(a)m 360(=)s 720(12)s 0 5742(def)m +720(nokon_liker_basic\(\):)s 1440 5358(global)m 2700(a)s 1440 4974(print)m 2520(a)s +1440 4590(a)m 1800(=)s 2160(0)s 320 fnt82 0 4082(Derimot)m +1143(vil)s 1553(det)s 2023(f\370lg)s 1(ande)k 3214(eksemplet)s +4588(oppf\370re)s 5656(se)s 4(g)k 6149(som)s 6761(v)s 4(enta:)k +300 fnt29 0 3707(a)m 360(=)s 720(12)s 0 3323(def)m +720(nokon_liker_basic\(\):)s 1440 2939(print)m 2520(a)s 320 fnt82 0 2546(Dvs,)m +658(det)s 1128(skri)s 8(v)k 1831(ut)s 2159(talet)s +2787(12.)s +grestore + +grestore + +pgsave restore +showpage + +%%Trailer +%%DocumentNeededResources: font Courier +%%+ font Helvetica +%%+ font Helvetica-Oblique +%%+ font Symbol +%%+ font Times-Roman +%%+ font Times-Italic +%%+ font Times-Bold +%%DocumentSuppliedResources: procset LoutStartUp +%%+ procset LoutMarginNotes +%%+ encoding vec2 +%%Pages: 23 +%%EOF + +postslide + +preslide +%!PS-Adobe-3.0 +%%Creator: Basser Lout Version 3.08 (May 1996) +%%CreationDate: Fri Sep 17 13:15:54 1999 +%%DocumentData: Binary +%%DocumentNeededResources: (atend) +%%DocumentSuppliedResources: (atend) +%%Pages: 1 0 +%%BoundingBox: 0 0 595 842 +%%EndComments + +%%BeginProlog +%%BeginResource: procset LoutStartUp +/m { 3 1 roll moveto show } bind def +/s { exch currentpoint exch pop moveto show } bind def +/k { exch neg 0 rmoveto show } bind def +/ul { gsave setlinewidth dup 3 1 roll + moveto lineto stroke grestore } bind def +/in { 1440 mul } def +/cm { 567 mul } def +/pt { 20 mul } def +/em { 120 mul } def +/sp { louts mul } def +/vs { loutv mul } def +/ft { loutf mul } def +/dg { } def + +/LoutGraphic { + /louts exch def + /loutv exch def + /loutf exch def + /ymark exch def + /xmark exch def + /ysize exch def + /xsize exch def +} def + +/LoutFont +{ findfont exch scalefont setfont +} bind def + +/LoutRecode { + { findfont dup length dict begin + {1 index /FID ne {def} {pop pop} ifelse} forall + /Encoding exch def + currentdict end definefont pop + } + stopped pop +} bind def + +/BeginEPSF { + /LoutEPSFState save def + /dict_count countdictstack def + /op_count count 1 sub def + userdict begin + /showpage { } def + 0 setgray 0 setlinecap + 1 setlinewidth 0 setlinejoin + 10 setmiterlimit [] 0 setdash newpath + /languagelevel where + { pop languagelevel + 1 ne + { false setstrokeadjust false setoverprint + } if + } if +} bind def + +/EndEPSF { + count op_count sub { pop } repeat + countdictstack dict_count sub { end } repeat + LoutEPSFState restore +} bind def +%%EndResource + +%%BeginResource encoding vec2 +/vec2 [ +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quoteright +/parenleft /parenright /asterisk /plus /comma /hyphen /period /slash +/zero /one /two /three /four /five /six /seven +/eight /nine /colon /semicolon /less /equal /greater /question +/at /A /B /C /D /E /F /G +/H /I /J /K /L /M /N /O +/P /Q /R /S /T /U /V /W +/X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore +/quoteleft /a /b /c /d /e /f /g +/h /i /j /k /l /m /n /o +/p /q /r /s /t /u /v /w +/x /y /z /braceleft /bar /braceright /asciitilde /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /quotedblleft /quotedblright /fi +/fl /endash /emdash /bullet /dagger /daggerdbl /florin /fraction +/dotlessi /grave /acute /circumflex /tilde /macron /breve /dotaccent +/dieresis /.notdef /ring /cedilla /.notdef /hungarumlaut /ogonek /caron +/space /exclamdown /cent /sterling /currency /yen /brokenbar /section +/dieresis /copyright /ordfeminine /guillemotleft /logicalnot /hyphen /registered /macron +/degree /plusminus /twosuperior /threesuperior /acute /mu /paragraph /periodcentered +/cedilla /onesuperior /ordmasculine /guillemotright /onequarter /onehalf /threequarters /questiondown +/Agrave /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla +/Egrave /Eacute /Ecircumflex /Edieresis /Igrave /Iacute /Icircumflex /Idieresis +/Eth /Ntilde /Ograve /Oacute /Ocircumflex /Otilde /Odieresis /multiply +/Oslash /Ugrave /Uacute /Ucircumflex /Udieresis /Yacute /Thorn /germandbls +/agrave /aacute /acircumflex /atilde /adieresis /aring /ae /ccedilla +/egrave /eacute /ecircumflex /edieresis /igrave /iacute /icircumflex /idieresis +/eth /ntilde /ograve /oacute /ocircumflex /otilde /odieresis /divide +/oslash /ugrave /uacute /ucircumflex /udieresis /yacute /thorn /ydieresis +] def +%%EndResource + +%%BeginResource: procset LoutMarginNotes +% @PrependGraphic file /usr/local/lib/lout/include/dl.lpg + +% path for @Box symbol +/LoutBox +{ 0 0 moveto xsize 0 lineto + xsize ysize lineto 0 ysize lineto + closepath +} def + +% path for @CurveBox symbol +/LoutCurveBox +{ xmark 0 moveto + xsize xmark sub xmark xmark 270 360 arc + xsize xmark sub ysize xmark sub xmark 0 90 arc + xmark ysize xmark sub xmark 90 180 arc + xmark xmark xmark 180 270 arc + closepath +} def + +% path for @ShadowBox symbol +/LoutShadowBox +{ xmark 2 mul 0 moveto xsize 0 lineto + xsize ysize xmark 2 mul sub lineto + xsize xmark sub ysize xmark 2 mul sub lineto + xsize xmark sub xmark lineto + xmark 2 mul xmark lineto + closepath +} def + +% set up dictionary containing margin note data: parity LoutMargSet - +/LoutMargSet +{ /LoutMargDict 12 dict def + LoutMargDict begin + /parity exch def + /matr matrix currentmatrix def + /rightx xsize def + /lefty ysize def % highest allowable point for top of next left note + /righty ysize def % highest allowable point for top of next right note + /max { 2 copy gt { pop } { exch pop } ifelse } def + /min { 2 copy lt { pop } { exch pop } ifelse } def + end +} def + +%translate coordinate system for marginal notes: type LoutMargShift - +% where type 0 is left margin, 1 is right margin, 2 is outer, 3 is inner +/LoutMargShift +{ LoutMargDict begin + + % y coordinate of top of note, in margin coords, before vertical adjust + 0 ysize transform matr itransform exch pop + + % decide whether left or right margin based on type and parity + exch [ 0 1 parity 1 parity sub ] exch get 0 eq + { + % left margin: adjust top of note downwards if overlaps previous note + lefty min + + % bottom of note is new lefty position and also translate position + ysize sub dup /lefty exch def + + % want right edge of note at coordinate zero + xsize neg exch + } + { + % right margin: adjust top of note downwards if overlaps previous note + righty min + + % bottom of note is new righty position and also translate position + ysize sub dup /righty exch def + + % want left edge of note at coordinate rightx + rightx exch + } ifelse + + % stack now contains coord of bottom left corner in margin coordinates + matr setmatrix translate + end +} def + +% create LoutPageDict with left, right, foot, top for @Place symbol users +/LoutPageSet +{ + /LoutPageDict 5 dict def + LoutPageDict begin + /matr matrix currentmatrix def + /left 0 def + /right xsize def + /foot 0 def + /top ysize def + end + +} def + +%%EndResource + +%%EndProlog + +%%BeginSetup +%%IncludeResource: font Times-Roman +/Times-Romanfnt82 vec2 /Times-Roman LoutRecode +/fnt82 { /Times-Romanfnt82 LoutFont } def +%%IncludeResource: font Helvetica +/Helveticafnt35 vec2 /Helvetica LoutRecode +/fnt35 { /Helveticafnt35 LoutFont } def +%%EndSetup + +%%Page: 20 1 +%%BeginPageSetup +%%PageResources: font Times-Roman +%%+ font Times-Bold +%%+ font Courier +/pgsave save def +%%IncludeResource: font Times-Bold +/Times-Boldfnt84 vec2 /Times-Bold LoutRecode +/fnt84 { /Times-Boldfnt84 LoutFont } def +%%IncludeResource: font Courier +/Courierfnt29 vec2 /Courier LoutRecode +/fnt29 { /Courierfnt29 LoutFont } def +0.0500 dup scale 10 setlinewidth +%%EndPageSetup +gsave +0 0 translate +320 fnt82 0.0 0.0 0.0 setrgbcolor 11900 16840 0 0 320 384 80 LoutGraphic +gsave +LoutPageSet +grestore +gsave +0 0 translate +90.0000 rotate + +grestore + +grestore +gsave +0 0 translate +90.0000 rotate +gsave +1417 -9065 translate +320 fnt82 0.0 0.0 0.0 setrgbcolor 14006 7648 0 7648 320 384 80 LoutGraphic +gsave +0 LoutMargSet +grestore +160 fnt82 0.0 0.0 0.0 setrgbcolor 13849 7540(20)m 320 fnt84 6262 6509(Exceptions)m +300 fnt29 0 5863(TeitException)m 2520(=)s 2880("Brukardefinert meta-unntak.")s 0 5479(try:)m +1080(#)s 1440(Det)s 2160(er)s 2700(lov)s 3420(\345)s +3780(n\370ste)s 4860(try-statements.)s 1440 5095(try:)m 2880 4711(raise)m 3960(TeitException)s +1440 4327(finally:)m 2880 3943(#)m 3240(Dette)s 4320(vert)s 5220(eksekvert)s +7020(uansett)s 2880 3559(print)m 3960("Her sett ein ofte clean-up kode.")s 0 3175(except)m 1260(TeitException:)s +1440 2791(#)m 1800(Dette)s 2880(vert)s 3780(eksekvert)s 5580(om)s +6120(det)s 6840(vert)s 7740(aktivert)s 9360(ein)s 10080(exception)s +1440 2407(print)m 2520("Denne teksten vil alltid verte skrive ut.")s 0 2023(else:)m 1440 1639(#)m 1800(Koden)s +2880(i)s 3240(else)s 4140(vert)s 5040(utf\370r)s 6120(om)s +6660(det)s 7380(ikkje)s 8460(vart)s 9360(aktivert)s 1440 1255(#)m +1800(ein)s 2520(exception)s 1440 871(print)m 2520("Denne teksten vert aldri skrive ut her.")s +grestore + +grestore + +pgsave restore +showpage + +%%Trailer +%%DocumentNeededResources: font Courier +%%+ font Helvetica +%%+ font Helvetica-Oblique +%%+ font Symbol +%%+ font Times-Roman +%%+ font Times-Italic +%%+ font Times-Bold +%%DocumentSuppliedResources: procset LoutStartUp +%%+ procset LoutMarginNotes +%%+ encoding vec2 +%%Pages: 23 +%%EOF + +postslide + +%%Page: 11 12 +%%BeginPageSetup +save +%%EndPageSetup + +preslide +%!PS-Adobe-3.0 +%%Creator: Basser Lout Version 3.08 (May 1996) +%%CreationDate: Fri Sep 17 13:15:54 1999 +%%DocumentData: Binary +%%DocumentNeededResources: (atend) +%%DocumentSuppliedResources: (atend) +%%Pages: 1 0 +%%BoundingBox: 0 0 595 842 +%%EndComments + +%%BeginProlog +%%BeginResource: procset LoutStartUp +/m { 3 1 roll moveto show } bind def +/s { exch currentpoint exch pop moveto show } bind def +/k { exch neg 0 rmoveto show } bind def +/ul { gsave setlinewidth dup 3 1 roll + moveto lineto stroke grestore } bind def +/in { 1440 mul } def +/cm { 567 mul } def +/pt { 20 mul } def +/em { 120 mul } def +/sp { louts mul } def +/vs { loutv mul } def +/ft { loutf mul } def +/dg { } def + +/LoutGraphic { + /louts exch def + /loutv exch def + /loutf exch def + /ymark exch def + /xmark exch def + /ysize exch def + /xsize exch def +} def + +/LoutFont +{ findfont exch scalefont setfont +} bind def + +/LoutRecode { + { findfont dup length dict begin + {1 index /FID ne {def} {pop pop} ifelse} forall + /Encoding exch def + currentdict end definefont pop + } + stopped pop +} bind def + +/BeginEPSF { + /LoutEPSFState save def + /dict_count countdictstack def + /op_count count 1 sub def + userdict begin + /showpage { } def + 0 setgray 0 setlinecap + 1 setlinewidth 0 setlinejoin + 10 setmiterlimit [] 0 setdash newpath + /languagelevel where + { pop languagelevel + 1 ne + { false setstrokeadjust false setoverprint + } if + } if +} bind def + +/EndEPSF { + count op_count sub { pop } repeat + countdictstack dict_count sub { end } repeat + LoutEPSFState restore +} bind def +%%EndResource + +%%BeginResource encoding vec2 +/vec2 [ +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quoteright +/parenleft /parenright /asterisk /plus /comma /hyphen /period /slash +/zero /one /two /three /four /five /six /seven +/eight /nine /colon /semicolon /less /equal /greater /question +/at /A /B /C /D /E /F /G +/H /I /J /K /L /M /N /O +/P /Q /R /S /T /U /V /W +/X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore +/quoteleft /a /b /c /d /e /f /g +/h /i /j /k /l /m /n /o +/p /q /r /s /t /u /v /w +/x /y /z /braceleft /bar /braceright /asciitilde /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /quotedblleft /quotedblright /fi +/fl /endash /emdash /bullet /dagger /daggerdbl /florin /fraction +/dotlessi /grave /acute /circumflex /tilde /macron /breve /dotaccent +/dieresis /.notdef /ring /cedilla /.notdef /hungarumlaut /ogonek /caron +/space /exclamdown /cent /sterling /currency /yen /brokenbar /section +/dieresis /copyright /ordfeminine /guillemotleft /logicalnot /hyphen /registered /macron +/degree /plusminus /twosuperior /threesuperior /acute /mu /paragraph /periodcentered +/cedilla /onesuperior /ordmasculine /guillemotright /onequarter /onehalf /threequarters /questiondown +/Agrave /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla +/Egrave /Eacute /Ecircumflex /Edieresis /Igrave /Iacute /Icircumflex /Idieresis +/Eth /Ntilde /Ograve /Oacute /Ocircumflex /Otilde /Odieresis /multiply +/Oslash /Ugrave /Uacute /Ucircumflex /Udieresis /Yacute /Thorn /germandbls +/agrave /aacute /acircumflex /atilde /adieresis /aring /ae /ccedilla +/egrave /eacute /ecircumflex /edieresis /igrave /iacute /icircumflex /idieresis +/eth /ntilde /ograve /oacute /ocircumflex /otilde /odieresis /divide +/oslash /ugrave /uacute /ucircumflex /udieresis /yacute /thorn /ydieresis +] def +%%EndResource + +%%BeginResource: procset LoutMarginNotes +% @PrependGraphic file /usr/local/lib/lout/include/dl.lpg + +% path for @Box symbol +/LoutBox +{ 0 0 moveto xsize 0 lineto + xsize ysize lineto 0 ysize lineto + closepath +} def + +% path for @CurveBox symbol +/LoutCurveBox +{ xmark 0 moveto + xsize xmark sub xmark xmark 270 360 arc + xsize xmark sub ysize xmark sub xmark 0 90 arc + xmark ysize xmark sub xmark 90 180 arc + xmark xmark xmark 180 270 arc + closepath +} def + +% path for @ShadowBox symbol +/LoutShadowBox +{ xmark 2 mul 0 moveto xsize 0 lineto + xsize ysize xmark 2 mul sub lineto + xsize xmark sub ysize xmark 2 mul sub lineto + xsize xmark sub xmark lineto + xmark 2 mul xmark lineto + closepath +} def + +% set up dictionary containing margin note data: parity LoutMargSet - +/LoutMargSet +{ /LoutMargDict 12 dict def + LoutMargDict begin + /parity exch def + /matr matrix currentmatrix def + /rightx xsize def + /lefty ysize def % highest allowable point for top of next left note + /righty ysize def % highest allowable point for top of next right note + /max { 2 copy gt { pop } { exch pop } ifelse } def + /min { 2 copy lt { pop } { exch pop } ifelse } def + end +} def + +%translate coordinate system for marginal notes: type LoutMargShift - +% where type 0 is left margin, 1 is right margin, 2 is outer, 3 is inner +/LoutMargShift +{ LoutMargDict begin + + % y coordinate of top of note, in margin coords, before vertical adjust + 0 ysize transform matr itransform exch pop + + % decide whether left or right margin based on type and parity + exch [ 0 1 parity 1 parity sub ] exch get 0 eq + { + % left margin: adjust top of note downwards if overlaps previous note + lefty min + + % bottom of note is new lefty position and also translate position + ysize sub dup /lefty exch def + + % want right edge of note at coordinate zero + xsize neg exch + } + { + % right margin: adjust top of note downwards if overlaps previous note + righty min + + % bottom of note is new righty position and also translate position + ysize sub dup /righty exch def + + % want left edge of note at coordinate rightx + rightx exch + } ifelse + + % stack now contains coord of bottom left corner in margin coordinates + matr setmatrix translate + end +} def + +% create LoutPageDict with left, right, foot, top for @Place symbol users +/LoutPageSet +{ + /LoutPageDict 5 dict def + LoutPageDict begin + /matr matrix currentmatrix def + /left 0 def + /right xsize def + /foot 0 def + /top ysize def + end + +} def + +%%EndResource + +%%EndProlog + +%%BeginSetup +%%IncludeResource: font Times-Roman +/Times-Romanfnt82 vec2 /Times-Roman LoutRecode +/fnt82 { /Times-Romanfnt82 LoutFont } def +%%IncludeResource: font Helvetica +/Helveticafnt35 vec2 /Helvetica LoutRecode +/fnt35 { /Helveticafnt35 LoutFont } def +%%EndSetup + +%%Page: 21 1 +%%BeginPageSetup +%%PageResources: font Times-Roman +%%+ font Times-Italic +%%+ font Courier +/pgsave save def +%%IncludeResource: font Times-Italic +/Times-Italicfnt83 vec2 /Times-Italic LoutRecode +/fnt83 { /Times-Italicfnt83 LoutFont } def +%%IncludeResource: font Courier +/Courierfnt29 vec2 /Courier LoutRecode +/fnt29 { /Courierfnt29 LoutFont } def +0.0500 dup scale 10 setlinewidth +%%EndPageSetup +gsave +0 0 translate +320 fnt82 0.0 0.0 0.0 setrgbcolor 11900 16840 0 0 320 384 80 LoutGraphic +gsave +LoutPageSet +grestore +gsave +0 0 translate +90.0000 rotate + +grestore + +grestore +gsave +0 0 translate +90.0000 rotate +gsave +1417 -9065 translate +320 fnt82 0.0 0.0 0.0 setrgbcolor 14006 7648 0 7648 320 384 80 LoutGraphic +gsave +1 LoutMargSet +grestore +160 fnt82 0.0 0.0 0.0 setrgbcolor 13862 7540(21)m 320 fnt83 0 6546(Merk:)m +320 fnt82 640 5941(Ein)m 1159(kan)s 1697(spesi\207sere)s 3100(\210eire)s +3829(ulik)s 3(e)k 4538(\253e)s 4(xception)k 6012(handlers\273)s +7321(i)s 7481(serie.)s 8301(Om)s 8860(ein)s 9326(ikkje)s +10038(opplyser)s 11218(nok)s 3(on)k 12091(spesi\207kk)s 640 5557(e)m 4(xception,)k +2021(dvs)s 300 fnt29 2532 5566(except:)m 320 fnt82 3792 5557(,)m +3935(vil)s 320 fnt83 4345 5559(alle)m 320 fnt82 4893 5557(mogle)m 4(ge)k +6063(e)s 4(xceptions)k 7492(v)s 4(erte)k 8200(f)s 3(ang)k 1(a)k +8986(a)s 6(v)k 9355(den)s 9893(handleren.)s 11371(Om)s +11930(ein)s 12396(spesi\207serer)s 640 5173(\210eire)m 1369(ulik)s 3(e)k +2078(handlere,)s 3321(m\345)s 3791(difor)s 4491(ein)s 4957(slik)s +5498(settast)s 6374(sist.)s +grestore + +grestore + +pgsave restore +showpage + +%%Trailer +%%DocumentNeededResources: font Courier +%%+ font Helvetica +%%+ font Helvetica-Oblique +%%+ font Symbol +%%+ font Times-Roman +%%+ font Times-Italic +%%+ font Times-Bold +%%DocumentSuppliedResources: procset LoutStartUp +%%+ procset LoutMarginNotes +%%+ encoding vec2 +%%Pages: 23 +%%EOF + +postslide + +preslide +%!PS-Adobe-3.0 +%%Creator: Basser Lout Version 3.08 (May 1996) +%%CreationDate: Fri Sep 17 13:15:54 1999 +%%DocumentData: Binary +%%DocumentNeededResources: (atend) +%%DocumentSuppliedResources: (atend) +%%Pages: 1 0 +%%BoundingBox: 0 0 595 842 +%%EndComments + +%%BeginProlog +%%BeginResource: procset LoutStartUp +/m { 3 1 roll moveto show } bind def +/s { exch currentpoint exch pop moveto show } bind def +/k { exch neg 0 rmoveto show } bind def +/ul { gsave setlinewidth dup 3 1 roll + moveto lineto stroke grestore } bind def +/in { 1440 mul } def +/cm { 567 mul } def +/pt { 20 mul } def +/em { 120 mul } def +/sp { louts mul } def +/vs { loutv mul } def +/ft { loutf mul } def +/dg { } def + +/LoutGraphic { + /louts exch def + /loutv exch def + /loutf exch def + /ymark exch def + /xmark exch def + /ysize exch def + /xsize exch def +} def + +/LoutFont +{ findfont exch scalefont setfont +} bind def + +/LoutRecode { + { findfont dup length dict begin + {1 index /FID ne {def} {pop pop} ifelse} forall + /Encoding exch def + currentdict end definefont pop + } + stopped pop +} bind def + +/BeginEPSF { + /LoutEPSFState save def + /dict_count countdictstack def + /op_count count 1 sub def + userdict begin + /showpage { } def + 0 setgray 0 setlinecap + 1 setlinewidth 0 setlinejoin + 10 setmiterlimit [] 0 setdash newpath + /languagelevel where + { pop languagelevel + 1 ne + { false setstrokeadjust false setoverprint + } if + } if +} bind def + +/EndEPSF { + count op_count sub { pop } repeat + countdictstack dict_count sub { end } repeat + LoutEPSFState restore +} bind def +%%EndResource + +%%BeginResource encoding vec2 +/vec2 [ +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quoteright +/parenleft /parenright /asterisk /plus /comma /hyphen /period /slash +/zero /one /two /three /four /five /six /seven +/eight /nine /colon /semicolon /less /equal /greater /question +/at /A /B /C /D /E /F /G +/H /I /J /K /L /M /N /O +/P /Q /R /S /T /U /V /W +/X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore +/quoteleft /a /b /c /d /e /f /g +/h /i /j /k /l /m /n /o +/p /q /r /s /t /u /v /w +/x /y /z /braceleft /bar /braceright /asciitilde /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /quotedblleft /quotedblright /fi +/fl /endash /emdash /bullet /dagger /daggerdbl /florin /fraction +/dotlessi /grave /acute /circumflex /tilde /macron /breve /dotaccent +/dieresis /.notdef /ring /cedilla /.notdef /hungarumlaut /ogonek /caron +/space /exclamdown /cent /sterling /currency /yen /brokenbar /section +/dieresis /copyright /ordfeminine /guillemotleft /logicalnot /hyphen /registered /macron +/degree /plusminus /twosuperior /threesuperior /acute /mu /paragraph /periodcentered +/cedilla /onesuperior /ordmasculine /guillemotright /onequarter /onehalf /threequarters /questiondown +/Agrave /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla +/Egrave /Eacute /Ecircumflex /Edieresis /Igrave /Iacute /Icircumflex /Idieresis +/Eth /Ntilde /Ograve /Oacute /Ocircumflex /Otilde /Odieresis /multiply +/Oslash /Ugrave /Uacute /Ucircumflex /Udieresis /Yacute /Thorn /germandbls +/agrave /aacute /acircumflex /atilde /adieresis /aring /ae /ccedilla +/egrave /eacute /ecircumflex /edieresis /igrave /iacute /icircumflex /idieresis +/eth /ntilde /ograve /oacute /ocircumflex /otilde /odieresis /divide +/oslash /ugrave /uacute /ucircumflex /udieresis /yacute /thorn /ydieresis +] def +%%EndResource + +%%BeginResource: procset LoutMarginNotes +% @PrependGraphic file /usr/local/lib/lout/include/dl.lpg + +% path for @Box symbol +/LoutBox +{ 0 0 moveto xsize 0 lineto + xsize ysize lineto 0 ysize lineto + closepath +} def + +% path for @CurveBox symbol +/LoutCurveBox +{ xmark 0 moveto + xsize xmark sub xmark xmark 270 360 arc + xsize xmark sub ysize xmark sub xmark 0 90 arc + xmark ysize xmark sub xmark 90 180 arc + xmark xmark xmark 180 270 arc + closepath +} def + +% path for @ShadowBox symbol +/LoutShadowBox +{ xmark 2 mul 0 moveto xsize 0 lineto + xsize ysize xmark 2 mul sub lineto + xsize xmark sub ysize xmark 2 mul sub lineto + xsize xmark sub xmark lineto + xmark 2 mul xmark lineto + closepath +} def + +% set up dictionary containing margin note data: parity LoutMargSet - +/LoutMargSet +{ /LoutMargDict 12 dict def + LoutMargDict begin + /parity exch def + /matr matrix currentmatrix def + /rightx xsize def + /lefty ysize def % highest allowable point for top of next left note + /righty ysize def % highest allowable point for top of next right note + /max { 2 copy gt { pop } { exch pop } ifelse } def + /min { 2 copy lt { pop } { exch pop } ifelse } def + end +} def + +%translate coordinate system for marginal notes: type LoutMargShift - +% where type 0 is left margin, 1 is right margin, 2 is outer, 3 is inner +/LoutMargShift +{ LoutMargDict begin + + % y coordinate of top of note, in margin coords, before vertical adjust + 0 ysize transform matr itransform exch pop + + % decide whether left or right margin based on type and parity + exch [ 0 1 parity 1 parity sub ] exch get 0 eq + { + % left margin: adjust top of note downwards if overlaps previous note + lefty min + + % bottom of note is new lefty position and also translate position + ysize sub dup /lefty exch def + + % want right edge of note at coordinate zero + xsize neg exch + } + { + % right margin: adjust top of note downwards if overlaps previous note + righty min + + % bottom of note is new righty position and also translate position + ysize sub dup /righty exch def + + % want left edge of note at coordinate rightx + rightx exch + } ifelse + + % stack now contains coord of bottom left corner in margin coordinates + matr setmatrix translate + end +} def + +% create LoutPageDict with left, right, foot, top for @Place symbol users +/LoutPageSet +{ + /LoutPageDict 5 dict def + LoutPageDict begin + /matr matrix currentmatrix def + /left 0 def + /right xsize def + /foot 0 def + /top ysize def + end + +} def + +%%EndResource + +%%EndProlog + +%%BeginSetup +%%IncludeResource: font Times-Roman +/Times-Romanfnt82 vec2 /Times-Roman LoutRecode +/fnt82 { /Times-Romanfnt82 LoutFont } def +%%IncludeResource: font Helvetica +/Helveticafnt35 vec2 /Helvetica LoutRecode +/fnt35 { /Helveticafnt35 LoutFont } def +%%EndSetup + +%%Page: 22 1 +%%BeginPageSetup +%%PageResources: font Times-Roman +%%+ font Times-Bold +%%+ font Courier +%%+ font Times-Italic +/pgsave save def +%%IncludeResource: font Times-Bold +/Times-Boldfnt84 vec2 /Times-Bold LoutRecode +/fnt84 { /Times-Boldfnt84 LoutFont } def +%%IncludeResource: font Courier +/Courierfnt29 vec2 /Courier LoutRecode +/fnt29 { /Courierfnt29 LoutFont } def +%%IncludeResource: font Times-Italic +/Times-Italicfnt83 vec2 /Times-Italic LoutRecode +/fnt83 { /Times-Italicfnt83 LoutFont } def +0.0500 dup scale 10 setlinewidth +%%EndPageSetup +gsave +0 0 translate +320 fnt82 0.0 0.0 0.0 setrgbcolor 11900 16840 0 0 320 384 80 LoutGraphic +gsave +LoutPageSet +grestore +gsave +0 0 translate +90.0000 rotate + +grestore + +grestore +gsave +0 0 translate +90.0000 rotate +gsave +1417 -9065 translate +320 fnt82 0.0 0.0 0.0 setrgbcolor 14006 7648 0 7648 320 384 80 LoutGraphic +gsave +0 LoutMargSet +grestore +160 fnt82 0.0 0.0 0.0 setrgbcolor 13850 7540(22)m 320 fnt84 6401 6516(Modular)m +300 fnt29 0 5931(import)m 1260(string)s 0 5547(from)m 900(sys)s +1620(import)s 2880(version)s 0 5163(#)m 360(version)s 1800(er)s +2340(ein)s 3060(streng)s 4320(som)s 5040(til)s 5760(d\370mes)s +6840(kan)s 7560(sj\345)s 8280(slik)s 9180(ut:)s 0 4779(#)m +360(1.5.2)s 1440(\(#1,)s 2340(Jun)s 3060(11)s 3600(1999,)s +4680(02:41:53\))s 6480([GCC)s 7380(2.7.2.2+myc2])s 0 4011(print)m 1080("Dette er Python, versjon",)s +6120(string.split\(version\)[0])s 320 fnt83 0 3505(Merk:)m 300 fnt29 640 2900(from)m +1540(modul)s 2620(import)s 3880(*)s 320 fnt82 4140 2891(vil)m +4550(importere)s 5864(alle)s 6398(symbol)s 7412(fr\345)s 300 fnt29 +7846 2900(modul)m 320 fnt82 8826 2891(inn)m 9310(i)s 9470(namnerommet)s +11394(der)s 11882(ein)s 12348(k\370yrer)s 640 2507(importering)m 1(a.)k +2505(Dette)s 3270(er)s 3598(ein)s 4064(ef)s 8(fekti)k 8(v)k +5113(m\345te)s 5807(\345)s 6029(lage)s 6635(v)s 8(ansk)k 3(ele)k 4(g)k +7969(v)s 4(edlik)k 3(ehaldbar)k 9940(k)s 3(ode.)k +640 1827(Ein)m 1159(gjer)s 1735(ikkje)s 2447(nok)s 3(o)k +3155(spesielt)s 4191(for)s 4643(\345)s 4865(lage)s 5471(ein)s +5937(modul.)s 6971(Ei)s 7326(\207l)s 7665(med)s 8293(funksjonsde\207nisjonar)s +11122(er)s 11450(allereie)s 12462(ein)s 640 1443(modul.)m 300 fnt29 +1674 1452(import)m 2934(kjekkefunksjonar)s 320 fnt82 5894 1443(vil)m 6304(s\370k)s 3(e)k +6961(gjennom)s 8159(ein)s 8625(sti)s 8997(de\207nert)s 10052(i)s +300 fnt29 10212 1452(sys.path)m 320 fnt82 11732 1443(p\345)m 12114(jakt)s +12672(etter)s 13318(\207la)s 300 fnt29 640 1068(kjekkefunksjonar.py)m 320 fnt82 +4060 1059(.)m +grestore + +grestore + +pgsave restore +showpage + +%%Trailer +%%DocumentNeededResources: font Courier +%%+ font Helvetica +%%+ font Helvetica-Oblique +%%+ font Symbol +%%+ font Times-Roman +%%+ font Times-Italic +%%+ font Times-Bold +%%DocumentSuppliedResources: procset LoutStartUp +%%+ procset LoutMarginNotes +%%+ encoding vec2 +%%Pages: 23 +%%EOF + +postslide + +%%Page: 12 12 +%%BeginPageSetup +save +%%EndPageSetup + +preslide +%!PS-Adobe-3.0 +%%Creator: Basser Lout Version 3.08 (May 1996) +%%CreationDate: Fri Sep 17 13:15:54 1999 +%%DocumentData: Binary +%%DocumentNeededResources: (atend) +%%DocumentSuppliedResources: (atend) +%%Pages: 1 0 +%%BoundingBox: 0 0 595 842 +%%EndComments + +%%BeginProlog +%%BeginResource: procset LoutStartUp +/m { 3 1 roll moveto show } bind def +/s { exch currentpoint exch pop moveto show } bind def +/k { exch neg 0 rmoveto show } bind def +/ul { gsave setlinewidth dup 3 1 roll + moveto lineto stroke grestore } bind def +/in { 1440 mul } def +/cm { 567 mul } def +/pt { 20 mul } def +/em { 120 mul } def +/sp { louts mul } def +/vs { loutv mul } def +/ft { loutf mul } def +/dg { } def + +/LoutGraphic { + /louts exch def + /loutv exch def + /loutf exch def + /ymark exch def + /xmark exch def + /ysize exch def + /xsize exch def +} def + +/LoutFont +{ findfont exch scalefont setfont +} bind def + +/LoutRecode { + { findfont dup length dict begin + {1 index /FID ne {def} {pop pop} ifelse} forall + /Encoding exch def + currentdict end definefont pop + } + stopped pop +} bind def + +/BeginEPSF { + /LoutEPSFState save def + /dict_count countdictstack def + /op_count count 1 sub def + userdict begin + /showpage { } def + 0 setgray 0 setlinecap + 1 setlinewidth 0 setlinejoin + 10 setmiterlimit [] 0 setdash newpath + /languagelevel where + { pop languagelevel + 1 ne + { false setstrokeadjust false setoverprint + } if + } if +} bind def + +/EndEPSF { + count op_count sub { pop } repeat + countdictstack dict_count sub { end } repeat + LoutEPSFState restore +} bind def +%%EndResource + +%%BeginResource encoding vec2 +/vec2 [ +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quoteright +/parenleft /parenright /asterisk /plus /comma /hyphen /period /slash +/zero /one /two /three /four /five /six /seven +/eight /nine /colon /semicolon /less /equal /greater /question +/at /A /B /C /D /E /F /G +/H /I /J /K /L /M /N /O +/P /Q /R /S /T /U /V /W +/X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore +/quoteleft /a /b /c /d /e /f /g +/h /i /j /k /l /m /n /o +/p /q /r /s /t /u /v /w +/x /y /z /braceleft /bar /braceright /asciitilde /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /quotedblleft /quotedblright /fi +/fl /endash /emdash /bullet /dagger /daggerdbl /florin /fraction +/dotlessi /grave /acute /circumflex /tilde /macron /breve /dotaccent +/dieresis /.notdef /ring /cedilla /.notdef /hungarumlaut /ogonek /caron +/space /exclamdown /cent /sterling /currency /yen /brokenbar /section +/dieresis /copyright /ordfeminine /guillemotleft /logicalnot /hyphen /registered /macron +/degree /plusminus /twosuperior /threesuperior /acute /mu /paragraph /periodcentered +/cedilla /onesuperior /ordmasculine /guillemotright /onequarter /onehalf /threequarters /questiondown +/Agrave /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla +/Egrave /Eacute /Ecircumflex /Edieresis /Igrave /Iacute /Icircumflex /Idieresis +/Eth /Ntilde /Ograve /Oacute /Ocircumflex /Otilde /Odieresis /multiply +/Oslash /Ugrave /Uacute /Ucircumflex /Udieresis /Yacute /Thorn /germandbls +/agrave /aacute /acircumflex /atilde /adieresis /aring /ae /ccedilla +/egrave /eacute /ecircumflex /edieresis /igrave /iacute /icircumflex /idieresis +/eth /ntilde /ograve /oacute /ocircumflex /otilde /odieresis /divide +/oslash /ugrave /uacute /ucircumflex /udieresis /yacute /thorn /ydieresis +] def +%%EndResource + +%%BeginResource: procset LoutMarginNotes +% @PrependGraphic file /usr/local/lib/lout/include/dl.lpg + +% path for @Box symbol +/LoutBox +{ 0 0 moveto xsize 0 lineto + xsize ysize lineto 0 ysize lineto + closepath +} def + +% path for @CurveBox symbol +/LoutCurveBox +{ xmark 0 moveto + xsize xmark sub xmark xmark 270 360 arc + xsize xmark sub ysize xmark sub xmark 0 90 arc + xmark ysize xmark sub xmark 90 180 arc + xmark xmark xmark 180 270 arc + closepath +} def + +% path for @ShadowBox symbol +/LoutShadowBox +{ xmark 2 mul 0 moveto xsize 0 lineto + xsize ysize xmark 2 mul sub lineto + xsize xmark sub ysize xmark 2 mul sub lineto + xsize xmark sub xmark lineto + xmark 2 mul xmark lineto + closepath +} def + +% set up dictionary containing margin note data: parity LoutMargSet - +/LoutMargSet +{ /LoutMargDict 12 dict def + LoutMargDict begin + /parity exch def + /matr matrix currentmatrix def + /rightx xsize def + /lefty ysize def % highest allowable point for top of next left note + /righty ysize def % highest allowable point for top of next right note + /max { 2 copy gt { pop } { exch pop } ifelse } def + /min { 2 copy lt { pop } { exch pop } ifelse } def + end +} def + +%translate coordinate system for marginal notes: type LoutMargShift - +% where type 0 is left margin, 1 is right margin, 2 is outer, 3 is inner +/LoutMargShift +{ LoutMargDict begin + + % y coordinate of top of note, in margin coords, before vertical adjust + 0 ysize transform matr itransform exch pop + + % decide whether left or right margin based on type and parity + exch [ 0 1 parity 1 parity sub ] exch get 0 eq + { + % left margin: adjust top of note downwards if overlaps previous note + lefty min + + % bottom of note is new lefty position and also translate position + ysize sub dup /lefty exch def + + % want right edge of note at coordinate zero + xsize neg exch + } + { + % right margin: adjust top of note downwards if overlaps previous note + righty min + + % bottom of note is new righty position and also translate position + ysize sub dup /righty exch def + + % want left edge of note at coordinate rightx + rightx exch + } ifelse + + % stack now contains coord of bottom left corner in margin coordinates + matr setmatrix translate + end +} def + +% create LoutPageDict with left, right, foot, top for @Place symbol users +/LoutPageSet +{ + /LoutPageDict 5 dict def + LoutPageDict begin + /matr matrix currentmatrix def + /left 0 def + /right xsize def + /foot 0 def + /top ysize def + end + +} def + +%%EndResource + +%%EndProlog + +%%BeginSetup +%%IncludeResource: font Times-Roman +/Times-Romanfnt82 vec2 /Times-Roman LoutRecode +/fnt82 { /Times-Romanfnt82 LoutFont } def +%%IncludeResource: font Helvetica +/Helveticafnt35 vec2 /Helvetica LoutRecode +/fnt35 { /Helveticafnt35 LoutFont } def +%%EndSetup + +%%Page: 23 1 +%%BeginPageSetup +%%PageResources: font Times-Roman +%%+ font Times-Bold +%%+ font Courier +%%+ font Times-Italic +/pgsave save def +%%IncludeResource: font Times-Bold +/Times-Boldfnt84 vec2 /Times-Bold LoutRecode +/fnt84 { /Times-Boldfnt84 LoutFont } def +%%IncludeResource: font Courier +/Courierfnt29 vec2 /Courier LoutRecode +/fnt29 { /Courierfnt29 LoutFont } def +%%IncludeResource: font Times-Italic +/Times-Italicfnt83 vec2 /Times-Italic LoutRecode +/fnt83 { /Times-Italicfnt83 LoutFont } def +0.0500 dup scale 10 setlinewidth +%%EndPageSetup +gsave +0 0 translate +320 fnt82 0.0 0.0 0.0 setrgbcolor 11900 16840 0 0 320 384 80 LoutGraphic +gsave +LoutPageSet +grestore +gsave +0 0 translate +90.0000 rotate + +grestore + +grestore +gsave +0 0 translate +90.0000 rotate +gsave +1417 -9065 translate +320 fnt82 0.0 0.0 0.0 setrgbcolor 14006 7648 0 7648 320 384 80 LoutGraphic +gsave +1 LoutMargSet +grestore +160 fnt82 0.0 0.0 0.0 setrgbcolor 13857 7540(23)m 320 fnt84 6336 6509(I)m +6534(praksis?)s 320 fnt82 0 5457(\213)m 300 fnt29 640 5466(open\("filnamn",)m +3520("modi"\))s 320 fnt82 4860 5457(opner)m 5668(\207lobjekt.)s 0 4786(\213)m +300 fnt29 640 4795(string)m 320 fnt82 1800 4786(inneheld)m 2978(strengtenster)s 17(.)k +0 4113(\213)m 300 fnt29 640 4122(re)m 320 fnt82 1080 4113(inneheld)m +2258(Perl5-liknande)s 4211(re)s 4(ge)k 4(xp-funksjonalitet.)k 0 3442(\213)m +300 fnt29 640 3451(os)m 320 fnt82 1080 3442(inneheld)m 2258(os-tenster)s +3578(som)s 300 fnt29 4190 3451(fork)m 320 fnt82 4990 3442(og)m +300 fnt29 5381 3451(listdir)m 320 fnt82 6641 3442(.)m 0 2771(\213)m +300 fnt29 640 2780(sys)m 320 fnt82 1260 2771(inneheld)m 2438(systema)s 6(vhengige)k +4706(data)s 5318(og)s 5709(ein)s 6175(del)s 6639(grensesnitt.)s +8239(mellom)s 9293(anna)s 9977(til)s 10315(systemv)s 8(ariablar)k 17(.)k +0 2091(\213)m 640(Denne)s 1549(lista)s 2159(b\370r)s 2665(a)s 6(vsluttast)k +3943(s\345)s 4289(fort)s 4829(som)s 5441(r\345d,)s 5992(da)s +6374(ho)s 6765(er)s 320 fnt83 7093 2093(lang)m 320 fnt82 +7653 2091(.)m +grestore + +grestore + +pgsave restore +showpage + +%%Trailer +%%DocumentNeededResources: font Courier +%%+ font Helvetica +%%+ font Helvetica-Oblique +%%+ font Symbol +%%+ font Times-Roman +%%+ font Times-Italic +%%+ font Times-Bold +%%DocumentSuppliedResources: procset LoutStartUp +%%+ procset LoutMarginNotes +%%+ encoding vec2 +%%Pages: 23 +%%EOF + +postslide + +showpage + +%%EOF + diff --git a/quick-ref1_52.html b/quick-ref1_52.html new file mode 100644 index 0000000..8580341 --- /dev/null +++ b/quick-ref1_52.html @@ -0,0 +1,2696 @@ +<!doctype html public "-//w3c//dtd html 4.0 transitional//en"> +<html> +<head> + <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> + <meta name="GENERATOR" content="Mozilla/4.5 [fr] (WinNT; I) [Netscape]"> + <title>A Python Quick Reference</title> +<link rev="made" href="mailto:derek@cc.bellcore.com (Derek Fields)"> +</head> +<body> + +<center> +<h1> +Python 1.52 Quick Reference</h1></center> + +<hr> +<br><font size=-1> <i>1999/06/04, upgraded by Richard Gruet, <a href="mailto:rgruet@ina.fr">rgruet@ina.fr</a> +from V1.3 ref: 1995/10/30, by Chris Hoffmann, <a href="mailto:choffman@vicorp.com">choffman@vicorp.com</a></i></font> +<p><font size=-1>Based on:</font> +<br><font size=-1> Python Bestiary, Author: Ken Manheimer, +ken.manheimer@nist.gov</font> +<br><font size=-1> Python manuals, Author: Guido van +Rossum, <a href="mailto:guido@CNRI.Reston.Va.US">guido@CNRI.Reston.Va.US</a>, +<a href="mailto:guido@python.org">guido@python.org</a></font> +<br><font size=-1> python-mode.el, Author: Tim Peters, +<a href="mailto:tim_one@email.msn.com">tim_one@email.msn.com</a></font> +<br><font size=-1> and the readers of <a href="news:comp.lang.python">comp.lang.python</a></font> +<p><font size=-1>Python site: <a href="http://www.python.org/">http://www.python.org</a></font> +<br> +<hr> +<h2> +Contents</h2> + +<menu> +<li> +<a href="#Invocation">Invocation Options</a></li> + +<li> +<a href="#Environment">Environment Variables</a></li> + +<li> +<a href="#Terms">Terms Used In This Document</a></li> + +<li> +<a href="#LexEnt">Lexical Entities</a></li> + +<li> +<a href="#BasicTypes">Basic Types And Their Operations</a></li> + +<li> +<a href="#AdvTypes">Advanced Types</a></li> + +<li> +<a href="#Statements">Statements</a></li> + +<li> +<a href="#BuiltIn">Built In Functions</a></li> + +<li> +<a href="#BuiltInExc">Built In Exceptions</a></li> + +<li> +<a href="#SpecialMethods">Standard methods & operators redefinition +in user-created Classes</a></li> + +<li> +<a href="#typeAttributes">Special informative state attributes for some +types</a></li> + +<li> +<a href="#ImportantModules">Important Modules</a> : <a href="#sysModule">sys</a>, +<a href="#osModule">os</a>, +<a href="#posixModule">posix</a>, +<a href="#posixpathModule">posixpath</a>, +<a href="#stringModule">string</a>, +<a href="#reModule">re</a>, +<a href="#mathModule">math</a>, +<a href="#getoptModule">getopt</a></li> + +<li> +<a href="#OtherModules">List of modules In base distribution</a></li> + +<li> +<a href="#Workspace">Workspace Exploration And Idiom Hints</a></li> + +<li> +<a href="#Emacs">Python Mode for Emacs</a></li> + +<li> +<a href="#Debugger">The Python Debugger</a></li> +</menu> + +<hr> +<h2> +<a NAME="Invocation"></a>Invocation Options</h2> + +<pre><b>python</b> [-diOStuvxX?] [-c <i>command</i> | <i>script</i> | - ] [<i>args</i>] + + -d debug output from parser (also PYTHONDEBUG=x) + -i inspect interactively after running script (also PYTHONINSPECT=x,. + and force prompts, even if stdin appears not to be a terminal + -O optimize generated bytecode (set __debug__ = 0 =>s suppresses <i>assert</i>s) + -S don't imply 'import site' on initialization + -t issue warnings about inconsistent tab usage (-tt: issue errors) + -u unbuffered binary stdout and stderr (also PYTHONUNBUFFERED=x). + -v verbose (trace import statements) (also PYTHONVERBOSE=x) + -x skip first line of source, allowing use of non-unix + forms of #!cmd + -X disable class based built-in exceptions (for backward + compatibility management of exceptions) + -? Help! + + -c <i>command + </i>Specify the command to execute (see next section). + This terminates the option list (following options are + passed as arguments to the command). + <i>script</i> is the name of a python file (.py) to execute + - read from stdin. + + anything afterward is passed as options to python script or + command, not interpreted as an option to interpreter itself. + + <i>args</i> are passed to script or command (in sys.argv[1:])</pre> +If no script or command, Python enters interactive mode. +<hr> +<h2> +<a NAME="Environment"></a>ENVIRONMENT VARIABLES</h2> + +<dl> +<dt> +PYTHONHOME</dt> + +<br> Alternate <i>prefix</i> +directory (or <i>prefix</i>;<i>exec_prefix</i>). The default module search +path uses <i>prefix</i>/lib +<br>PYTHONPATH +<dd> + Augments the default search path for module files. The format is +the same as the shell's $PATH: one or more directory pathnames separated +by ':' or ';' without spaces around (semi-)colons!</dd> + +<dd> +On Windows first search for Registry key HKEY_LOCAL_MACHINE\Software\Python\PythonCore\v.x.y\PythonPath</dd> + +<br>(default value). You may also define a key named after your application +with a default string value giving +<br>the root directory path of your app. +<dt> +PYTHONSTARTUP</dt> + +<dd> + If this is the name of a readable file, the Python commands in that +file are executed before the first prompt is displayed in interactive mode +(no default).</dd> + +<dt> +PYTHONDEBUG</dt> + +<dd> + If non-empty, same as -d option</dd> + +<dt> +PYTHONINSPECT</dt> + +<dd> + If non-empty, same as -i option</dd> + +<dt> +PYTHONSUPPRESS</dt> + +<dd> + If non-empty, same as -s option</dd> + +<dt> +PYTHONUNBUFFERED</dt> + +<dd> + If non-empty, same as -u option</dd> + +<dt> +PYTHONVERBOSE</dt> + +<dd> + If non-empty, same as -v option</dd> + +<dt> +PYTHONCASEOK --to be verified--</dt> + +<dd> + If non-empty, ignore case in file/module names (imports)</dd> +</dl> + +<hr> +<h2> +<a NAME="Terms"></a>Terms Used In This Document</h2> + +<dl COMPACT> +<dt> +<i>sequence</i></dt> + +<dd> +a string, list or tuple</dd> + +<dt> +<i>suite</i></dt> + +<dd> +a series of statements, possibly separated by newlines. Must all be at +same indentation level, except for suites inside compound statements</dd> + +<dt> +<x></dt> + +<dd> +in a syntax diagram means a token referred to as "x"</dd> + +<dt> +[xxx]</dt> + +<dd> +in a syntax diagram means "xxx" is optional</dd> + +<dt> +x ==> y</dt> + +<dd> +means the value of <x> is <y></dd> + +<dt> +x <=> y</dt> + +<dd> +means "x is equivalent to y"</dd> +</dl> + +<hr> +<h2> +<a NAME="LexEnt"></a>Notable lexical entities</h2> + +<h3> +Keywords</h3> + +<blockquote> +<pre>and del for is raise +assert elif from lambda return +break else global not try +class except if or while +continue exec import pass +def finally in print</pre> +</blockquote> + +<ul> +<li> +(list of keywords in std module: keyword.py)</li> + +<li> +Illegitimate Tokens (only valid in strings): @ $ ?</li> + +<li> +A statement must all be on a single line. To break a statement over multiple +lines use "\", as with the C preprocessor. Exception: can always break +when inside any (), [], or {} pair, or in triple-quoted strings.</li> + +<li> +More than one statement can appear on a line if they are separated with +semicolons (";").</li> + +<li> +Comments start with "#" and continue to end of line.</li> +</ul> + +<h3> +Identifiers</h3> + (letter | "_") (letter +| digit | "_")* +<ul> +<li> +Python identifiers keywords, attributes, etc. are <b>case-sensitive</b>.</li> + +<li> +Special forms: <b>_</b><i>ident</i> (not imported by 'from module import +*'); <b>__</b><i>ident</i><b>__</b> (system defined name);</li> + +<br> <b>__</b><i>ident</i> +(class-private name mangling)</ul> + +<h3> +Operators</h3> + +<blockquote> + - +* ** +/ % +<br><< >> +& | +^ ~ +<br>< > +<= >= == +!= <></blockquote> + +<h3> +Strings</h3> +<b>"</b>a string enclosed by double quotes<b>"</b> +<br><b>'</b>another string delimited by single quotes and with a " inside<b>'</b> +<br><b>'''</b>a string containing embedded newlines and quote (') marks, +can be +<br>delimited with triple quotes.<b>'''</b> +<br>""" may also use 3- double quotes as delimiters """ +<br><b>r'</b>a raw string where \ are kept (literalized): handy for regular +expressions and windows paths!<b>'</b> +<br><b>R"</b>another raw string<b>" --</b> raw strings +cannot end with a \ +<ul> +<li> +Use <b>\</b> at end of line to continue a string on next line.</li> + +<li> +adjacent strings are concatened, e.g. 'Monty' ' Python' is the same as +'Monty Python'.</li> +</ul> + +<h4> +String Literal Escapes</h4> + +<pre> <b>\<i>newline</i></b> Ignored (escape newline) + <b>\\</b> Backslash (\) <b>\e</b> Escape (ESC) <b>\v</b> Vertical Tab (VT) + <b>\'</b> Single quote (') <b>\f</b> Formfeed (FF) <b>\0OO</b> (zero) char with + <b>\"</b> Double quote (") <b>\n</b> Linefeed (LF) octal value OO + <b>\a</b> Bell (BEL) <b>\r</b> Carriage Return (CR) <b>\xXX</b> char with + <b>\b</b> Backspace (BS) <b>\t</b> Horizontal Tab (TAB) hex value XX + <b>\<i>AnyOtherChar</i></b> is left as-is</pre> + +<ul> +<li> +NULL byte (\000) is NOT an end-of-string marker; NULL's may be embedded +in strings.</li> + +<li> +Strings (and tuples) are <u>immutable</u>: they cannot be modified.</li> +</ul> + +<h3> +Numbers</h3> +Decimal integer: 1234, 1234567890546378940<b>L</b> +(or <b>l)</b> +<br>Octal integer: <b>0</b>177, <b>0</b>177777777777777777L (begin with +a <b>0</b>) +<br>Hex integer: <b>0x</b>FF, <b>0X</b>FFFFffffFFFFFFFFFFL (begin with +<b>0x</b> +or <b>0X</b>) +<br>Long integer (unlimited precision): 1234567890123456<b>L</b> (ends +with <b>L</b> or<b> l</b>) +<br>Float (double precision): 3<b>.</b>14<b>e-10</b>, .001, 10., 1E3 +<br>Complex: 1<b>J</b>, 2<b>+</b>3<b>J</b>, 4<b>+</b>5<b>j </b>(ends with +<b>J</b> +or <b>j, +</b> separates real and imaginary parts which are both floats) +<h3> +Sequences</h3> + +<ul> +<li> +<u>String</u> of length 0, 1, 2 (see above)</li> + +<br>'', '1', "12" +<li> +<u>Tuple</u> of length 0, 1, 2, etc:</li> + +<br><b>()</b> (1,) (1,2) # parentheses are optional +if len > 0 +<li> +<u>List</u> of length 0, 1, 2, etc:</li> + +<br><b>[]</b> [1] [1,2]</ul> +Indexing is 0-based. Negative indices (usually) mean count backwards from +end of sequence. +<p>Sequence <u>slicing</u><b> [</b><i>starting-at-index</i> <b>: </b><i>but-less-than-index</i><b>]. +</b>Start +defaults to '0'; End defaults to 'sequence-length'. +<ul>a = (0,1,2,3,4,5,6,7) +<br>a[3] ==> 3 +<br>a[-1] ==> 7 +<br>a[2:4] ==> (2, 3) +<br>a[1:] ==> (1, 2, 3, 4, 5, 6, 7) +<br>a[:3] ==> (0, 1, 2) +<br>a[:] ==> (0,1,2,3,4,5,6,7) # makes a <b>copy</b> of the sequence.</ul> + +<h3> +Dictionaries (Mappings)</h3> +<u>Dictionary</u> of length 0, 1, 2, etc: +<br><b>{}</b> {1 : 'first'} {1 : 'first', 'next': 'second'} +<p> +<hr> +<h2> +<a NAME="BasicTypes"></a>Basic Types and Their Operations</h2> + +<h3> +Comparisons (defined between *any* types)</h3> + +<pre> < strictly less than + <= less than or equal + > strictly greater than + >= greater than or equal + == equal + != not equal ( "<>" is also allowed) + is object identity (are <b>objects</b> identical, not values) + is not negated object identity</pre> +X < Y < Z < W has expected meaning, unlike C +<h3> +Boolean values and operators</h3> + +<pre> <b>False</b> values: None, numeric zeros, empty sequences and mappings + <b>True</b> values: all other values + + <b>not</b> X: if X is false then 1, else 0 + X <b>or</b> Y: if X is false then Y, else X + X <b>and</b> Y: if X is false then X, else Y + + ('or', 'and' evaluate second arg only if necessary to determine outcome)</pre> + +<h3> +None</h3> +None is used as default return value on functions. +<br>Input that evaluates to None does not print when running Python interactively. +<h3> +Numeric types</h3> + +<h4> +Floats, integers and long integers.</h4> +Floats are implemented with C doubles. +<br>Integers are implemented with C longs. +<br>Long integers have unlimited size (only limit is system resources) +<h4> +Operators on all numeric types</h4> + +<pre> <b>abs</b>(x) absolute value of x + <b>int</b>(x) x converted to integer + <b>long</b>(x) x converted to long integer + <b>float</b>(x) x converted to floating point + <b>-</b>x x negated + <b>+</b>x x unchanged + x <b>+</b> y sum of x and y + x <b>-</b> y difference of x and y + x <b>*</b> y product of x and y + x <b>/</b> y quotient of x and y + x <b>%</b> y remainder of x / y + <b>divmod</b>(x, y) the tuple (x/y, x%y) + x <b>**</b> y x to the power y [same as: <b>pow</b>(x,y)]</pre> + +<h4> +Bit operators on integers and long integers</h4> + +<pre> <b>~</b>x the bits of x inverted + x <b>^</b> y bitwise exclusive or of x and y + x <b>&</b> y bitwise and of x and y + x <b>|</b> y bitwise or of x and y + x <b><<</b> n x shifted left by n bits + x <b>>></b> n x shifted right by n bits</pre> + +<h4> +Complex Numbers</h4> +represented as a pair of machine-level double precision floating point +numbers. +<br>The real and imaginary value of a complex number z can be retrieved +through the +<br>attributes <u>z.real</u> and <u>z.imag</u>. +<h4> +Numeric exceptions</h4> + +<dl COMPACT> +<dt> +TypeError</dt> + +<dd> +raised on application of arithmetic operation to non-number</dd> + +<dt> +OverflowError</dt> + +<dd> + numeric bounds exceeded</dd> + +<dt> +ZeroDivisionError</dt> + +<dd> + raised when zero second argument of div or modulo op</dd> +</dl> + +<h3> +Operations on all sequence types (lists, tuples, strings)</h3> + +<center><table BORDER CELLPADDING=3 WIDTH="60%" BGCOLOR="#FFCC99" > +<tr BGCOLOR="#FFCC99"> +<td><b>Operation</b></td> + +<td> +<center><b>Result</b></center> +</td> + +<td><b>Notes</b></td> +</tr> + +<tr BGCOLOR="#FFFFCC"> +<td><font face="Courier New,Courier"><i>x</i> <b>in</b> <i>s</i></font></td> + +<td>1 if an item of <i>s</i> is equal to <i>x</i>, else 0</td> + +<td></td> +</tr> + +<tr BGCOLOR="#FFFFCC"> +<td><font face="Courier New,Courier"><i>x</i> <b>not in</b> <i>s</i></font></td> + +<td>0 if an item of <i>s</i> is equal to <i>x</i>, else 1</td> + +<td> +<center> </center> +</td> +</tr> + +<tr BGCOLOR="#FFFFCC"> +<td><font face="Courier New,Courier"><i>s</i> <b>+</b> <i>t</i></font></td> + +<td>the concatenation of <i>s</i> and <i>t</i></td> + +<td></td> +</tr> + +<tr BGCOLOR="#FFFFCC"> +<td><font face="Courier New,Courier"><i>s </i><b>*</b> <i>n</i>, <i>n</i><b>*</b><i>s</i></font></td> + +<td><i>n</i> copies of <i>s</i> concatenated</td> + +<td> +<center> </center> +</td> +</tr> + +<tr BGCOLOR="#FFFFCC"> +<td><font face="Courier New,Courier"><i>s</i><b>[</b><i>i</i><b>]</b></font></td> + +<td><i>i</i>'th item of <i>s</i>, origin 0</td> + +<td> +<center>(1)</center> +</td> +</tr> + +<tr BGCOLOR="#FFFFCC"> +<td><font face="Courier New,Courier"><i>s</i><b>[</b><i>i</i><b>:</b><i>j</i><b>]</b></font></td> + +<td>slice of <i>s</i> from <i>i</i> (included) to <i>j</i> (excluded)</td> + +<td> +<center>(1), (2)</center> +</td> +</tr> + +<tr BGCOLOR="#FFFFCC"> +<td><font face="Courier New,Courier"><b>len</b>(<i>s</i>)</font></td> + +<td>length of <i>s</i></td> + +<td></td> +</tr> + +<tr BGCOLOR="#FFFFCC"> +<td><font face="Courier New,Courier"><b>min</b>(<i>s</i>)</font></td> + +<td>smallest item of <i>s</i></td> + +<td> +<center> </center> +</td> +</tr> + +<tr BGCOLOR="#FFFFCC"> +<td><font face="Courier New,Courier"><b>max</b>(<i>s</i>)</font></td> + +<td>largest item of <i>(s</i>)</td> + +<td> +<center> </center> +</td> +</tr> +</table></center> + +<pre><u>Notes</u> :</pre> + <font size=-1> (1) if <i>i</i> or <i>j</i> is negative, +the index is relative to the end of the string, ie <font face="Courier New,Courier">len(<i>s</i>)+ +<i>i</i></font> +or <font face="Courier New,Courier">len(<i>s</i>)+<i>j</i></font> is</font> +<br><font size=-1> substituted. +But note that -0 is still 0.</font> +<br><font size=-1> (2) The slice of <i>s</i> from <i>i</i> +to <i>j</i> is defined as the sequence of items with index <i>k</i> such +that <i>i <= k < j</i>.</font> +<br><font size=-1> +If <i>i</i> or <i>j</i> is greater than<font face="Courier New,Courier"> +len(<i>s</i>)</font>, use<font face="Courier New,Courier"> len(<i>s</i>)</font>. +If <i>i</i> is omitted, use len(<i>s</i>). If <i>i</i> is greater than +or</font> +<br><font size=-1> +equal to <i>j</i>, the slice is empty.</font> +<h3> +Operations on mutable (=modifiable) sequences (lists)</h3> + +<center><table BORDER CELLPADDING=3 WIDTH="70%" BGCOLOR="#FFFFCC" > +<tr BGCOLOR="#FFCC99"> +<td><b>Operation</b></td> + +<td> +<center><b>Result</b></center> +</td> + +<td><b>Notes</b></td> +</tr> + +<tr> +<td><font face="Courier New,Courier"><i>s</i><b>[</b><i>i</i><b>]</b> <b>=</b><i>x</i></font></td> + +<td>item <i>i</i> of <i>s</i> is replaced by <i>x</i></td> + +<td></td> +</tr> + +<tr> +<td><i>s</i>[<i>i</i>:<i>j</i>] <b>=</b> <i>t</i></td> + +<td>slice of <i>s</i> from <i>i</i> to <i>j</i> is replaced by <i>t</i></td> + +<td> +<center> </center> +</td> +</tr> + +<tr> +<td><font face="Courier New,Courier"><b>del</b> <i>s</i>[<i>i</i>:<i>j</i>]</font></td> + +<td>same as <font face="Courier New,Courier"><i>s</i>[<i>i</i>:<i>j</i>] += []</font></td> + +<td></td> +</tr> + +<tr> +<td><font face="Courier New,Courier"><i>s</i>.<b>append</b>(<i>x</i>)</font></td> + +<td>same as <font face="Courier New,Courier"><i>s</i>[len(<i>s</i>) : len(<i>s</i>)] += [<i>x</i>]</font></td> + +<td> +<center> </center> +</td> +</tr> + +<tr> +<td><font face="Courier New,Courier"><i>s</i>.<b>extend</b>(<i>x</i>)</font></td> + +<td>same as <font face="Courier New,Courier"><i>s</i>[len(<i>s</i>):len(<i>s</i>)]= +<i>x</i></font></td> + +<td> (5)</td> +</tr> + +<tr> +<td><font face="Courier New,Courier"><i>s</i>.<b>count</b>(<i>x</i>)</font></td> + +<td>return number of <i>i</i>'s for which <font face="Courier New,Courier"><i>s</i>[<i>i</i>] +== <i>x</i></font></td> + +<td></td> +</tr> + +<tr> +<td><font face="Courier New,Courier"><i>s</i>.<b>index</b>(<i>x</i>)</font></td> + +<td>return smallest <i>i</i> such that <font face="Courier New,Courier"><i>s</i>[<i>i</i>] +== <i>x</i></font></td> + +<td> +<center>(1)</center> +</td> +</tr> + +<tr> +<td><font face="Courier New,Courier"><i>s</i>.<b>insert</b>(<i>i</i>, <i>x</i>)</font></td> + +<td>same as <font face="Courier New,Courier"><i>s</i>[<i>i</i>:<i>i</i>] += [<i>x</i>]</font> if <i>i</i> >= 0</td> + +<td></td> +</tr> + +<tr> +<td><font face="Courier New,Courier"><i>s</i>.<b>remove</b>(<i>x</i>)</font></td> + +<td>same as <font face="Courier New,Courier">del <i>s</i>[<i>s</i>.index(<i>x</i>)]</font></td> + +<td> +<center>(1)</center> +</td> +</tr> + +<tr> +<td><font face="Courier New,Courier"><i>s</i>.<b>pop</b>(<b>[</b><i>i</i><b>]</b>)</font></td> + +<td>same as x = s[i]; del s[i]; return x</td> + +<td> (4)</td> +</tr> + +<tr> +<td><font face="Courier New,Courier"><i>s</i>.<b>reverse</b>()</font></td> + +<td>reverse the items of <i>s</i> in place</td> + +<td> +<center>(3)</center> +</td> +</tr> + +<tr> +<td><font face="Courier New,Courier"><i>s</i>.<b>sort</b>(<b>[</b><i>cmpFct</i><b>]</b>)</font></td> + +<td>sort the items of <i>s</i> in place</td> + +<td> +<center>(2), (3)</center> +</td> +</tr> +</table></center> + +<p><u>Notes</u> : +<br> <font size=-1> (1) raise a ValueError exception when +<i>x</i> +is not found in <i>s</i> (i.e. out of range).</font> +<br><font size=-1> (2) The sort() method takes +an optional argument specifying a comparison fct of 2 arguments (list items) +which should</font> +<br><font size=-1> +return -1, 0, or 1 depending on whether the 1st argument is considered +smaller than, equal to, or larger than the 2nd</font> +<br><font size=-1> +argument. Note that this slows the sorting process down considerably.</font> +<br><font size=-1> (3) The sort() and reverse() +methods <b>modify</b> the list <b>in place</b> for economy of space when +sorting or reversing a large list.</font> +<br><font size=-1> +They don't return the sorted or reversed list to remind you of this side +effect.</font> +<br><font size=-1> (4) [<i>New 1.5.2</i>] The pop() +method is experimental and not supported by other mutable sequence types +than lists.</font> +<br><font size=-1> +The optional argument i defaults to -1, so that by default the last +item is removed and returned.</font> +<br><font size=-1> (5) [<i>New 1.5.2</i>] Experimental +! Raises an exception when x is not a list object.</font> +<br> +<br> +<h3> +Operations on mappings (dictionaries)</h3> + +<center><table BORDER CELLPADDING=3 WIDTH="70%" BGCOLOR="#FFFFCC" > +<tr BGCOLOR="#FFCC99"> +<td><b>Operation</b></td> + +<td> +<center><b>Result</b></center> +</td> + +<td><b>Notes</b></td> +</tr> + +<tr> +<td><font face="Courier New,Courier"><b>len</b>(<i>d</i>)</font></td> + +<td>the number of items in <i>d</i></td> + +<td></td> +</tr> + +<tr> +<td><font face="Courier New,Courier"><i>d</i><b>[</b><i>k</i><b>]</b></font></td> + +<td>the item of <i>d</i> with key <i>k</i></td> + +<td> +<center>(1)</center> +</td> +</tr> + +<tr> +<td><font face="Courier New,Courier"><i>d</i>[<i>k</i>] <b>=</b> x</font></td> + +<td>set <i>d</i>[<i>k</i>] to <i>x</i></td> + +<td></td> +</tr> + +<tr> +<td><font face="Courier New,Courier"><b>del</b> <i>d</i>[<i>k</i>]</font></td> + +<td>remove <i>d</i>[<i>k</i>] from <i>d</i></td> + +<td> +<center>(1)</center> +</td> +</tr> + +<tr> +<td><font face="Courier New,Courier"><i>d</i>.<b>clear</b>()</font></td> + +<td>remove all items from <i>d</i></td> + +<td></td> +</tr> + +<tr> +<td><font face="Courier New,Courier"><i>d</i>.<b>copy</b>()</font></td> + +<td>a shallow copy of <i>d</i></td> + +<td></td> +</tr> + +<tr> +<td><font face="Courier New,Courier"><i>d</i>.<b>has_key</b>(<i>k</i>)</font></td> + +<td>1 if <i>d</i> has key <i>k</i>, else 0</td> + +<td></td> +</tr> + +<tr> +<td><font face="Courier New,Courier"><i>d</i>.<b>items</b>()</font></td> + +<td>a copy of <i>d</i>'s list of (key, item) pairs</td> + +<td> +<center>(2)</center> +</td> +</tr> + +<tr> +<td><font face="Courier New,Courier"><i>d</i>.<b>keys</b>()</font></td> + +<td>a copy of <i>d</i>'s list of keys</td> + +<td> +<center>(2)</center> +</td> +</tr> + +<tr> +<td><font face="Courier New,Courier"><i>d1</i>.<b>update</b>(<i>d2</i>)</font></td> + +<td><font face="Courier New,Courier">for k, v in d2.items(): d1[k] = v</font></td> + +<td> +<center>(3)</center> +</td> +</tr> + +<tr> +<td><font face="Courier New,Courier"><i>d</i>.<b>values</b>()</font></td> + +<td>a copy of <i>d</i>'s list of values</td> + +<td> +<center>(2)</center> +</td> +</tr> + +<tr> +<td><font face="Courier New,Courier"><i>d</i>.<b>get</b>(<i>k</i>,<i>defaultval</i>)</font></td> + +<td>the item of <i>d</i> with key <i>k</i></td> + +<td> +<center>(4)</center> +</td> +</tr> +</table></center> + +<blockquote> +<blockquote> +<blockquote><u>Notes</u> : +<br><font size=-1> TypeError is raised if key is not acceptable</font> +<br><font size=-1> (1) KeyError is raised if key k is not in the +map</font> +<br><font size=-1> (2) Keys and values are listed in random order</font> +<br><font size=-1> (3) <i>d2</i> must be of the same type as <i>d1</i></font> +<br><font size=-1><i> (</i>4) Never raises an exception if <i>k</i> +is not in the map, instead it returns <i>defaultVal</i>.</font> +<br><font size=-1><i> defaultVal</i> is optional, +when not provided and <i>k</i> is not in the map, None is returned.</font></blockquote> +</blockquote> +</blockquote> + +<h3> +Format operator for strings (%)</h3> + +<h4> +<font face="Courier New,Courier">Uses C </font>printf format codes :</h4> +Supports: %, c, s, i, d, u, o, x, X, e, E, f, g, G. +<p>Width and precision may be a * to specify that an integer argument specifies +the actual width or precision. +<p>The flag characters -, +, blank, # and 0 are understood. +<p>%s will convert any type argument to string (uses <i>str()</i> function) +<pre> a = '%s has %03d quote types.' <b>%</b> ('Python', 2) + a ==> 'Python has 002 quote types.'</pre> +Right-hand-side can be a <i>mapping</i>: +<pre> a = '%<b>(lang)</b>s has %<b>(c)</b>03d quote types.' % {'c':2, 'lang':'Python}</pre> +(<i>vars()</i> function very handy to use on right-hand-side.) +<h3> +<font color="#000000">File Objects</font></h3> +Created with built-in function <i>open()</i>; may be created by other modules's +functions as well. +<h4> +Operators on file objects</h4> + +<pre> f.<b>close</b>() close file f. + f.<b>fileno</b>() get fileno (fd) for f. + f.<b>flush</b>() flush file's internal buffer. + f.<b>isatty</b>() 1 if file is connected to a tty-like dev, else 0 + f.<b>read</b>([size]) read at most <i>size</i> bytes from file and return + as a string object. If <i>size</i> omitted, read to EOF. + + f.<b>readline</b>() read one entire line from file + f.<b>readlines</b>() read until EOF with readline() and return list + of lines read. + + f.<b>seek</b>(offset, whence=0) set file's position, like + "stdio's fseek()". + whence == 0 then use absolute indexing + whence == 1 then offset relative to current pos + whence == 2 then offset relative to file end + + f.<b>tell</b>() return file's current position + f.<b>write</b>(str) Write string to file. + f.<b>writelines</b>(list) Write list of strings to file.</pre> + +<h4> +File Exceptions</h4> + +<dl> +<dt> +EOFError</dt> + +<dd> + End-of-file hit when reading (may be raised many times, e.g. if <i>f</i> +is a tty).</dd> + +<dt> +IOError</dt> + +<dd> + Other I/O-related I/O operation failure</dd> +</dl> + +<hr> +<h2> +<a NAME="AdvTypes"></a>Advanced Types</h2> +<i>-See manuals for more details</i> - +<ul> +<li> +<i>Module</i> objects</li> + +<li> +<i>Class</i> objects</li> + +<li> +<i>Class instance</i> objects</li> + +<li> +<i>Type</i> objects (see module: types)</li> + +<li> +<i>File</i> objects (see above)</li> + +<li> +<i>Slice</i> objects</li> + +<li> +<i>XRange</i> objects</li> + +<li> +Callable types:</li> + +<ul> +<li> +User-defined (written in Python):</li> + +<ul> +<li> +User-defined <i>Function</i> objects</li> + +<li> +User-defined <i>Method</i> objects</li> +</ul> + +<li> +Built-in (written in C):</li> + +<ul> +<li> +Built-in <i>Function</i> objects</li> + +<li> +Built-in <i>Method</i> objects</li> +</ul> +</ul> + +<li> +Internal Types:</li> + +<ul> +<li> +<i>Code</i> objects (byte-compile executable Python code: <i>bytecode</i>)</li> + +<li> +<i>Frame</i> objects (execution frames)</li> + +<li> +<i>Traceback</i> objects (stack trace of an exception)</li> +</ul> +</ul> + +<hr> +<h2> +<a NAME="Statements"></a>Statements</h2> + +<pre><b>pass</b> -- Null statement +<b>=</b> -- Assignment operator. Can unpack tuples, lists, strings + first, second = a[0:2]; [f, s] = range(2); c1,c2,c3='abc' + Tip: x,y = y,x swaps x and y. +<b>del</b> <name>[,<name>]* -- Unbind name(s) from object. Object will be indirectly + (and automatically) deleted only if no longer referenced. +<b>print</b> [<c1> [, <c2> ]* [,] + -- Writes to sys.stdout. + Puts spaces between arguments. Puts newline at end + unless statement ends with comma. + Print is not required when running interactively, + simply typing an expression will print its value, + unless the value is None. +<b>exec</b> <x> [in <globals> [,<locals>]] + -- Executes <x> in namespaces provided. Defaults + to current namespaces. <x> can be a string, file + object or a function object. +<b>f</b>(<value>,... [<id>=<value>]) + -- Call function 'f' with parameters. Parameters can + be passed by name or be omitted if function + defines default values. E.g. for 'f' is defined as + "def f(p1=1, p2=2)" + "f()" <=> "f(1, 2)" + "f(10)" <=> "f(10, 2)" + "f(p2=99)" <=> "f(1, 99)"</pre> + +<h3> +Control Flow</h3> + +<pre><b>if</b> <condition<i>></i><b>:</b> <suite<i>> +</i>[<b>elif</b> <condition<i>></i><b>:</b> <suite<i>></i>]* +[<b>else:</b> <suite<i>></i>] + -- usual if/else_if/else statement + +<b>while</b> <condition><b>:</b> <suite> +[<b>else:</b> <suite>] + -- usual while statement. "else" suite is executed + after loop exits, unless the loop is exited with + "break" + +<b>for</b> <target> <b>in</b> <condition-list><b>:</b> <suite> +[<b>else:</b> <suite>] + -- iterates over sequence "<condition-list>", + assigning each element to "<target>". Use built-in <i>range +</i> function to iterate a number of times. + "else" suite executed at end unless loop exited + with "break" + +<b>break</b> -- immediately exit "for" or "while" loop + +<b>continue</b> -- immediately do next iteration of "for" or "while" loop + +<b>return</b> [<result>] + -- return from function (or method) and return + "<result>". If no result given, then returns <i>None</i>.</pre> + +<h3> +Exception Statements</h3> + +<pre><b>assert</b> expr[, message] + -- expr is evaluated. if false, raise exception AssertionError + with message. Inhibited if __debug__ is 0.</pre> + +<pre><b>try:</b> <suite1> +[<b>except</b> [<exception> [, <value>]<b>:</b> <suite2>]+ +[<b>else:</b> <suite3>] + -- statements in <suite1> are executed. If an + exception occurs, look in "except" clauses for + matching <exception>. If matches or bare "except" + execute suite of that clause. If no exception happens + suite in "else" clause is executed after <suite1>. + If <exception> has a value, it is put in <value>. + <exception> can also be tuple of exceptions, e.g. + "except (KeyError, NameError), val: print val" + +<b>try:</b> <suite1> +<b>finally:</b> <suite2> + -- statements in <suite1> are executed. If no + exception, execute <suite2> (even if <suite1> is + exited with a "return", "break" or "continue" + statement). If exception did occur, executes + <suite2> and them immediately reraises exception. + +<b>raise</b> <exception> [,<value> [,<traceback>]] + -- raises <exception> with optional value + <value>. Parameter <traceback> + specifies a traceback object to use when printing + the exception's backtrace. +<b>raise</b> -- a raise statement without arguments re-raises + the last exception raised in the current function + +An exception is either a <i>string</i> (object) or a <i>class instance</i>. +Can create a new one simply by creating a new string: + + my_exception = 'You did something wrong' + <b>try</b>: + if bad: + <b>raise</b> my_exception, bad + <b>except</b> my_exception, value: + print 'Oops', value</pre> + +<pre>Exception classes must be derived from the predefined class: Exception, eg:</pre> + +<pre> class text_exception(Exception): + <b>try</b>: + if bad: + <b>raise</b> text_exception() + # This is a shorthand for the form + # "raise <class>, <instance>" + <b>except</b> Exception: + print 'Oops' + # This will be printed because + # text_exception is a subclass of Exception + +When an error message is printed for an unhandled exception which is a +class, the class name is printed, then a colon and a space, and +finally the instance converted to a string using the built-in function +str().</pre> + +<pre>All built-in exception classes derives from StandardError, itself +derived from Exception.</pre> + +<h3> +Name Space Statements</h3> +[1.51: On Mac & Windows, the case of module file names must now match +the case as used +<br> in the <i>import</i> statement] +<pre><i>Packages</i> (>1.5): a package is a name space which maps to a directory including + module(s) and the special initialization module '__init__.py' + (possibly empty). Packages/dirs can be nested. You address a + module's symbol via '[package.[package...]module.symbol's.</pre> + +<pre><b>import</b> <module_id1> [, <module_id2>]* + -- imports modules. Members of module must be + referred to by qualifying with [package.]module name: + "import sys; print sys.argv:" + "import package1.subpackage.module; package1.subpackage.module.foo()" + +<b>from</b> <module_id> <b>import</b> <id1> [, <id2>]* + -- imports names from module <module_id>. Names + are not qualified: + "from sys import argv; print argv" + "from package1 import module; module.foo()" + "from package1.module import foo; foo()" + +<b>from</b> <module_id> <b>import * +</b> -- imports all names in module <module_id>, except + those starting with "_"; *to be used sparsely* : + "from sys import *; print argv" + "from package.module import *; print x' + +<b>global</b> <id1> [,<id2>]* + -- ids are from global scope (usually meaning from module) + rather than local (usually meaning only in function). + -- E.g. in fct without "global" statements, assuming + "a" is name that hasn't been used in fct or module + so far: + -Try to read from "a" -> NameError + -Try to write to "a" -> creates "a" local to fcn + -If "a" not defined in fct, but is in module, then + -Try to read from "a", gets value from module + -Try to write to "a", creates "a" local to fct + + But note "a[0]=3" starts with search for "a", + will use to global "a" if no local "a".</pre> + +<h3> +Function Definition</h3> + +<pre><b>def</b> <func_id> ([<param_list>])<b>:</b> <suite> + -- creates a function object and assigns it name + <func_id>. + +<param_list> ==> [<id> [, <id>]*] [<id> = + <v> [, + <id> = + <v>]*] + [*<id>] + [**<id>] +[Args are passed by <b>value</b>.Thus only args representing a <i>mutable</i> object +can be modified (are <i>inout</i> parameters). Use a <b>tuple</b> to return more than +one value]</pre> + +<pre>E.g. + <b>def</b> test (p1, p2 = 1+1, *rest, **keywords): + -- Parameters with "=" have default value (<v> is + evaluated when function defined). + If list has "*<id>" then <id> is assigned + a tuple of all remaining args passed to function. + (allows vararg functions). + If list has "**<id>" then <id> is assigned + a dictionary of all arguments passed as keywords.</pre> + +<h3> +Class Definition</h3> + +<pre><b>class</b> <class_id> [(<super_class1> [,<super_class2>]*)]: <suite> + -- Creates a class object and assigns it name <class_id> + <suite> may contain local "defs" of class methods and + assignments to class attributes. +E.g. + <b>class</b> my_class (class1, class_list[3]): ... + Creates a class object inheriting from both "class1" and whatever + class object "class_list[3]" evaluates to. Assigns new + class object to name "my_class". + + -First arg to class methods is always instance object, called '<b>self</b>' + by convention. + -Special method <b>__init__</b>() is called when instance is created. + -Special method <b>__del__</b>() called when no more reference to object. + -Create instance by "<i>calling</i>" class object, possibly with arg + (thus instance=apply(aClassObject, args...) creates an instance!) + -In current implementation, can't subclass off built-in + classes. But can "wrap" them, see __getattr__() below. + + +E.g. + class c (c_parent): + def __init__(self, name): self.name = name + def print_name(self): print "I'm", self.name + def call_parent(self): c_parent.print_name(self) + + instance = c('tom') + print instance.name + 'tom' + instance.print_name() + "I'm tom" + + Call parent's super class by accessing parent's method + directly and passing "self" explicitly (see "call_parent" + in example above). + + Many other special methods available for implementing + arithmetic operators, sequence, mapping indexing, etc.</pre> + +<h4> +Documentation Strings</h4> +Modules, classes and functions may be documented by placing a string literal +by itself as the first statement in the suite. The documentation can be +retrieved by getting the '<b>__doc__</b>' attribute from the module, class +or function. +<pre>Example: + class c: + "A description of 'c'" + def __init__(self): + "A description of the constructor" + # etc. +Then c.__doc__ <=> "A description of 'c'". +Then c.__init__.__doc__ <=> "A description of the constructor".</pre> + +<h3> +Others</h3> + +<pre><b>lambda</b> [<param_list>]: <returnedExpr> + -- Create an anonymous function. <returnedExpr> must be + an expression, not a statement (e.g., not "if xx:...", + "print xxx", etc.) and thus can't contain newlines. + Used mostly for filter(), map(), reduce() functions.</pre> + +<hr> +<h2> +<a NAME="BuiltIn"></a>Built-In Functions</h2> + +<pre><b>__import__</b>(name[, globals[, locals[, fromlist]]]) + Import module within the given context (see lib ref for more details) + +<b>abs</b>(x) Return the absolute value of a number + +<b>apply</b>(f, args[, keywords]) + Call func/method <f> with args <args> and optional keywords + +<b>callable</b>(x) Returns 1 if x callable, else 0. + +<b>chr</b>(i) Return one-character string whose ASCII code is + integer i + +<b>cmp</b>(x,y) Return neg, zero, pos if x <, ==, > to y + +<b>coerce</b>(x,y) Return a tuple of the two <i>numeric</i> arguments converted to + a common type. + +<b>compile</b>(string, filename, kind) + Compile <string> into a code object. + <filename> is used in error message, can be any string. It is + usually the file from which the code was read, or eg. '<string>' + if not read from file. + <kind> can be 'eval' if <string> is a single stmt, or 'single' + which prints the output of expression statements that + evaluate to something else than "None" or be 'exec'. + +<b>complex</b>(real[, image]) + Build a complex object (can also be done using J or j suffix, + e.g. 1+3J)</pre> + +<pre><b>delattr</b>(obj, name) + deletes attribute named <name> of object <obj> <=> del obj.name</pre> + +<pre><b>dir</b>([object]) If no args, return the list of names in current local + symbol table. With a module, class or class instance + object as arg, return list of names in its attr dict. + +<b>divmod</b>(a,b) Returns tuple of (a/b, a%b) + +<b>eval</b>(s, globals, locals) + Eval string <s> in (optional) <globals>, <locals>. + <s> must have no NULL's or newlines. <s> can also be a + code object. + + E.g.: x = 1; incr_x = eval('x + 1') + +<b>execfile</b>(file[, globals[, locals]]) + Execute a file without creating a new module, unlike import.</pre> + +<pre><b>filter</b>(function, sequence) + Construct a list from those elements of <sequence> for which + <function> returns true. <function> takes one parameter. + +<b>float</b>(x) Convert a number or a string to floating point. + +<b>getattr</b>(object, name[, default])) <font size=-1>[<default> arg added in 1.5.2] +</font> Get attr called <name> from <object>, e.g. getattr(x, 'f') <=> x.f). + If not found, raise AttributeError or return <default> if specified. + +<b>globals</b>() Returns a dictionary containing current global variables. + +<b>hasattr</b>(object, name) + Returns true if <object> has attr called <name>. + +<b>hash</b>(object) Return the hash value of the object (if it has one) + +<b>hex</b>(x) Convert a number to a hexadecimal string. + +<b>id</b>(object) Return a unique 'identity' integer for an object. + +<b>input</b>([prompt]) Prints prompt, if given. Reads input and evaluates it.</pre> + +<pre><b>int</b>(x) Convert a number or a string to a plain integer. + +<b>intern</b>(aString) + Enter <String> in the table of "interned strings" and + return the string. Interned strings are 'immortals'. +<b>isinstance</b>(obj, class) + return true if <obj> is an instance of <class></pre> + +<pre><b>issubclass</b>(class1, class2) + return true if <class1> is derived from <class2></pre> + +<pre><b>len</b>(s) Return the length (the number of items) of an object + (sequence or dictionary). + +<b>list</b>(sequence) + Convert <sequence> into a list. If already a list, + return a copy of it.</pre> + +<pre><b>locals</b>() Return a dictionary containing current local variables. + +<b>long</b>(x) Convert a number or a string to a long integer. + +<b>map</b>(function, list, ...) + Apply <function> to every item of <list> and return a list + of the results. If additional arguments are passed, + <function> must take that many arguments and it is given + to <function> on each call. + +<b>max</b>(s) Return the largest item of a non-empty sequence. + +<b>min</b>(s) Return the smallest item of a non-empty sequence. + +<b>oct</b>(x) Convert a number to an octal string. + +<b>open</b>(filename [, mode='r', [bufsize=<implementation dependent>]]) + Return a new file object. First two args are same as + those for C's "stdio open" function. <bufsize> is 0 + for unbuffered, 1 for line-buffered, negative for + sys-default, all else, of (about) given size. + +<b>ord</b>(c) Return integer ASCII value of <c> (str of len 1). + +<b>pow</b>(x, y [, z]) Return x to power y [modulo z]. See also ** operator. + +<b>range</b>(start [,end [, step]]) + return list of ints from >= start and < end. + With 1 arg, list from 0..<arg>-1 + With 2 args, list from <start>..<end>-1 + With 3 args, list from <start> up to <end> by <step> + +<b>raw_input</b>([prompt]) + Print prompt if given, then read string from std + input (no trailing \n). + +<b>reduce</b>(f, list [, init]) + Apply the binary function <f> to the items of + <list> so as to reduce the list to a single value. + If <init> given, it is "prepended" to <list>. + +<b>reload</b>(module) Re-parse and re-initialize an already imported module. + Useful in interactive mode, if you want to reload a + module after fixing it. If module was synactically + correct but had an error in initialization, must + import it one more time before calling reload(). + +<b>repr</b>(object) Return a string containing a printable representation + of an object. Equivalent to `object` (using + backquotes). + +<b>round</b>(x,n=0) Return the floating point value x rounded to n digits + after the decimal point. + +<b>setattr</b>(object, name, value) + This is the counterpart of getattr(). + setattr(o, 'foobar', 3) <=> o.foobar = 3 + <u>Create</u> attribute if it doesn't exist! + +<b>slice</b>([start,] stop[, step]) + Return a <i>slice object</i> representing a range, with R/O + attributes: start, stop, step.</pre> + +<pre><b>str</b>(object) Return a string containing a nicely printable + representation of an object. + +<b>tuple</b>(sequence) Creates a tuple with same elements as <sequence>. If + already a tuple, return itself (not a copy). + +<b>type</b>(obj) Return a type object [see module <i>types</i>]representing the + type of <obj>. E.g., import types + if type(x) == types.StringType: print 'It is a string' + +<b>vars</b>([object]) Without arguments, return a dictionary corresponding + to the current local symbol table. With a module, + class or class instance object as argument + returns a dictionary corresponding to the object's + symbol table. Useful with "%" formatting operator. + +<b>xrange</b>(start [, end [, step]]) + Like range(), but doesn't actually store entire list + all at once. Good to use in "for" loops when there is a + big range and little memory.</pre> + +<hr> +<h2> +<a NAME="BuiltInExc"></a>Built-In Exceptions</h2> + +<dl> +<dt> +<i>Exception</i></dt> + +<dt> + Root class for all exceptions</dt> + +<dt> +<i> SystemExit</i></dt> + +<dt> + On 'sys.exit()'</dt> + +<dt> +<i> StandardError</i></dt> + +<dt> + +Base class for all built-in exceptions; derived from Exception root class.</dt> + +<dt> +<i> ArithmeticError</i></dt> + +<dt> + +Base class for OverflowError, ZeroDivisionError, FloatingPointError</dt> + +<dt> +<i> OverflowError</i></dt> + +<br> +On excessively large arithmetic operation +<dt> +<i> ZeroDivisionError</i></dt> + +<dd> + On division or modulo +operation with 0 as 2nd arg</dd> + +<dt> +<i> FloatingPointError</i></dt> + +<dt> + +when a floating point operation fails.</dt> + +<dt> +<i> </i></dt> + +<br><i> AssertionError</i> +<dt> + +When an <i>assert</i> statement fails.</dt> + +<dt> +<i> AttributeError</i></dt> + +<br> +On attribute reference or assignment failure +<dt> +<i> EOFError</i></dt> + +<br> +Immediate end-of-file hit by input() or raw_input() +<dt> +<i> EnvironmentError</i><font size=-1> +[<b>new</b> in 1.5.2]</font></dt> + +<dt> + +On error outside Python; error arg tuple is (errno, errMsg...)</dt> + +<dt> +<i> IOError</i><font size=-1> +[<b>changed</b> in 1.5.2]</font></dt> + +<dd> + I/O-related operation failure</dd> + +<dt> +<i> OSError</i><font size=-1> +[<b>new</b> in 1.5.2]</font></dt> + +<dd> + used by the <i>os</i> module's <i>os.error</i> +exception.</dd> + +<dt> +<i> ImportError</i></dt> + +<dd> + On failure of `import' to find module or name</dd> + +<dt> +<i> KeyboardInterrupt</i></dt> + +<dd> + On user entry of the interrupt key (often `Control-C')</dd> + +<dt> +<i> LookupError</i></dt> + +<dt> + +base class for IndexError, KeyError</dt> + +<dt> +<i> IndexError</i></dt> + +<dd> + On out-of-range sequence +subscript</dd> + +<dt> +<i> KeyError</i></dt> + +<dd> + On reference to a non-existent +mapping (dict) key</dd> + +<dt> +<i> MemoryError</i></dt> + +<dd> + On recoverable memory exhaustion</dd> + +<dt> +<i> NameError</i></dt> + +<dd> + On failure to find a local or global (unqualified) +name</dd> + +<dt> +<i> RuntimeError</i></dt> + +<dd> + Obsolete catch-all; define a suitable error instead</dd> + +<br> <i>NotImplementedError</i><font size=-1> +[<b>new</b> in 1.5.2]</font> +<dd> + On method not implemented</dd> + +<dt> +<i> SyntaxError</i></dt> + +<dd> + On parser encountering a syntax error</dd> + +<dt> +<i> SystemError</i></dt> + +<dd> + On non-fatal interpreter error - bug - report +it</dd> + +<dt> +<i> TypeError</i></dt> + +<dd> + On passing inappropriate type to built-in op or +func</dd> + +<dt> +<i> ValueError</i></dt> + +<dd> + On arg error not covered by TypeError or more +precise</dd> +</dl> + +<hr> +<h2> +<a NAME="SpecialMethods"></a>Standard methods & operators redefinition +in classes</h2> + +<pre>Standard methods & operators map to methods in user-defined classes and thus may be redefined, e.g. + class x: + def __init__(self, v): self.value = v + def __add__(self, r): return self.value + r + a = x(3) # sort of like calling x.__init__(a, 3) + a + 4 # is equivalent to a.__add__(4)</pre> + +<h3> +Special methods for any class</h3> +(s: self, o: other) +<pre> __init__(s, args) object instantiation + + __del__(s) called on object demise (refcount becomes 0) + __repr__(s) repr() and `...` conversions + __str__(s) str() and 'print' statement + __cmp__(s, o) implements <, ==, >, <=, <>, !=, >=, is [not] + __hash__(s) hash() and dictionary operations + __getattr__(s, name) called when attr lookup doesn't find <name> + __setattr__(s, name, val) called when setting an attr + (inside, don't use "self.name = value" + use "self.__dict__[name] = val") + __delattr__(s, name) called to delete attr <name> + + __call__(self, *args) called when an instance is called as function.</pre> + +<h3> +Operators</h3> + +<blockquote>See list in the <i>operator</i> module. Operator function names +are provided with 2 variants, with or without +<br>ading & trailing '__' (eg. __add__ or add). +<p><b>Numeric operations special methods</b> +<br>(s: self, o: other)</blockquote> + +<pre> s+o = __add__(s,o) s-o = __sub__(s,o) + s*o = __mul__(s,o) s/o = __div__(s,o) + s%o = __mod__(s,o) divmod(s,o) = __divmod__(s,o) + pow(s,o) = __pow__(s,o) + s&o = __and__(s,o) + s^o = __xor__(s,o) s|o = __or__(s,o) + s<<o = __lshift__(s,o) s>>o = __rshift__(s,o) + nonzero(s) = __nonzero__(s) (used in boolean testing) + -s = __neg__(s) +s = __pos__(s) + abs(s) = __abs__(s) ~s = __invert__(s) (bitwise) + int(s) = __int__(s) long(s) = __long__(s) + float(s) = __float__(s) + oct(s) = __oct__(s) hex(s) = __hex__(s) + coerce(s,o) = __coerce__(s,o) + + Right-hand-side equivalents for all binary operators exist; + are called when class instance is on r-h-s of operator: + a + 3 calls __add__(a, 3) + 3 + a calls __radd__(a, 3)</pre> + +<blockquote><b>All seqs and maps, general operations plus:</b> +<br>(s: self, i: index or key)</blockquote> + +<pre> len(s) = __len__(s) length of object, >= 0. Length 0 == false + s[i] = __getitem__(s,i) Element at index/key i, origin 0</pre> + +<blockquote><b>Sequences, general methods, plus:</b> +<pre> s[i]=v = __setitem__(s,i,v) + del s[i] = __delitem__(s,i) + s[i:j] = __getslice__(s,i,j) + s[i:j]=seq = __setslice__(s,i,j,seq) + del s[i:j] = __delslice__(s,i,j) == s[i:j] = [] + seq * n = __repeat__(seq, n) + s1 + s2 = __concat__(s1, s2)</pre> +<b>Mappings, general methods, plus</b> +<pre> hash(s) = __hash__(s) - hash value for dictionary references + s[k]=v = __setitem__(s,k,v) + del s[k] = __delitem__(s,k)</pre> +</blockquote> + +<h2> +<a NAME="typeAttributes"></a>Special informative state attributes for some +types:</h2> + +<pre> <b>Lists & Dictionaries</b>: + __methods__ (list, R/O): list of method names of the object + + <b>Modules</b>: + __dict__ (dict, R/O): module's name space + __doc__ (string/None, R/O): doc string (<=> __dict__['__doc__']) + __name__(string, R/O): module name (also in __dict__['__name__']) + __file__(string/undefined, R/O): pathname of .pyc, .pyo or .pyd (undef for + modules statically linked to the interpreter) + <b>Classes</b>: [bold: writable since 1.5.2] + __bases__ (tuple, R/<b>W)</b>: parent classes + __dict__ (dict, R/<b>W</b>): attributes (class name space) + __name__(string, R/<b>W</b>): class name (also in __dict__['__name__']) + __doc__ (string/None, R/W): doc string (<=> __dict__['__doc__']) + + <b>Instances: +</b> __class__ (class, R/W): instance's class + __dict__ (dict, R/W): attributes + + + <b>User-defined functions</b>: [bold: writable since 1.5.2] + __doc__ (string/None, R/<b>W</b>): doc string + __name__(string, R/O): function name + func_defaults (tuple/None, R/<b>W</b>): default args values if any + func_code (code, R/<b>W</b>): code object representing the compiled function body + func_globals (dict, R/O): ref to dictionary of func global variables + func_doc (R/<b>W</b>): same as __doc__ + + <b>User-defined Methods</b>: + im_self (instance/None, R/O): target instance object (None if unbound) + im_func (function, R/O): function object + im_class (class, R/O): class defining the method (may be a base class) + __doc__ (string/None, R/O): doc string + __name__(string, R/O): method name (same as im_func.__name__) + + <b>Built-in Functions & methods</b>: + __doc__ (string/None, R/O): doc string + __name__ (string, R/O): function name + __self__ : [methods only] target object + __members__ = list of attr names: ['__doc__','__name__','__self__']) + + <b>Codes</b>: + co_argcount (int, R/0): number of positional args + co_nlocals (int, R/O): number of local vars (including args) + co_varnames (tuple, R/O): names of local vars (starting with args) + co_code (string, R/O): sequence of bytecode instructions + co_consts (tuple, R/O): litterals used by the bytecode, 1st one is + fct doc (or None) + co_name (string, R/O): name of function + co_names (tuple, R/O): names used by the bytecode + co_filename (string, R/O): filename from which the code was compiled + co_flags (int, R/O): flags for the interpreter + bit 2 set if fct uses "*arg" syntax + bit 3 set if fct uses '**keywords' syntax + HINT: use codehack.getlineno() to get 1st lineNo of a code object + + <b>Frames</b>: + f_back (frame/None, R/O): previous stack frame (towards the caller) + f_code (code, R/O): code object being executed in this frame + f_locals (dict, R/O): local vars + f_globals (dict, R/O): global vars + f_builtins (dict, R/O): built-in (intrinsic) names + f_restricted (int, R/O): flag indicating whether fct is executed in + restricted mode + f_lineno (int, R/O): current line number + f_lasti (int, R/O): precise instruction (index into bytecode) + f_trace (function/None, R/W): debug hook called at start of each source line + + <b>Tracebacks</b>: + tb_next (frame/None, R/O): next level in stack trace (towards the frame where + the exception occurred) + tb_frame (frame, R/O): execution frame of the current level + tb_lineno (int, R/O): line number where the exception occured + tb_lasti (int, R/O): precise instruction (index into bytecode) + + <b>Slices</b>: + start (any/None, R/O): lowerbound + stop (any/None, R/O): upperbound + step (any/None, R/O): step value + + <b>Complex numbers</b>: + real (float, R/O): real part + imag (float, R/O): imaginary part + +<b> XRanges</b>: + tolist (Built-in method, R/O): ?</pre> + +<hr> +<h2> +<a NAME="ImportantModules"></a>Important Modules</h2> + +<center><a NAME="sysModule"></a><b><i><font size=+2>sys</font></i></b></center> +<b>Some variables:</b> +<pre>argv -- The list of command line arguments passed to a + Python script. sys.argv[0] is the script name. +builtin_module_names + -- A list of strings giving the names of all modules + written in C that are linked into this interpreter. + +check_interval -- How often to check for thread switches or signals + (measured in number of virtual machine instructions) +exc_type +exc_value +exc_traceback -- <b>Deprecated</b> since release 1.5. Use exc_info() instead. + +exitfunc -- User can set to a parameterless fcn. It will get + called before interpreter exits. +last_type +last_value +last_traceback -- Set only when an exception not handled and + interpreter prints an error. Used by debuggers. + +maxint -- maximum positive value for integers</pre> + +<pre>modules -- Dictionary of modules that have already been loaded. + +path -- Search path for external modules. Can be modified + by program. +platform -- The current platform, e.g. "sunos5", "win32" +ps1 +ps2 -- prompts to use in interactive mode. + +stdin +stdout +stderr -- File objects used for I/O. User can redirect by + assigning a new file object to them (or any object: + .with a method write(string) for stdout/stderr, + .with a method readline() for stdin) + +version -- string containing version info about Python interpreter. + +(and also: copyright, dllhandle, exec_prefix, prefix)</pre> +<b>Functions:</b> +<pre>exit(n) -- Exit with status <n>. Raises SystemExit exception. + (Hence can be caught and ignored by program) +getrefcount(object) + -- Return the reference count of the object. Generally 1 higher + than you might expect, because of <object> arg temp reference. +setcheckinterval(interval) + -- Set the interpreter's thread switching interval (in number of virtual + code instructions, default:10). +settrace(func) -- Sets a trace function: called before each line of + code is exited. +setprofile(func) + -- Sets a profile function for performance profiling. +exc_info() -- info on exception currently being handled; this is a + tuple (exc_type, exc_value, exc_traceback). + <b>Warning</b>: assigning the traceback return value to a local + variable in a function handling an exception will cause + a circular reference.</pre> + +<hr> +<center><a NAME="osModule"></a><b><i><font size=+2>os</font></i></b></center> +"synonym" for whatever O/S-specific module is proper for current environment. +Uses "posix" whenever possible. +<p><b>Variables</b> +<br>name -- name +of O/S-specific module (e.g. "posix", "mac", "nt") +<br>path +-- O/S-specific module for path manipulations. +<br> +on Unix, os.path.split() <=> posixpath.split() +<br>curdir -- string used +to represent current directory ('.') +<br>pardir -- string used +to represent parent directory ('..') +<br>sep +-- string used to separate directories ('/' or '\') +<br>pathsep -- character used to separate +search path components (as in $PATH), eg. ';' for windows. +<br>linesep -- [1.5.2] line separator +as used in <b>binary</b> files, ie '\n' on Unix, '\r\n' on Dos/Win, '\r' +on Mac +<p><b>Functions</b> +<br>makedirs(path[, mode=0777])<font size=-1> +[<b>new</b> in 1.5.2]</font> +<br> +-- Recursive directory creation (create required intermediary dirs); os.error +if fails. +<br>removedirs(path)<font size=-1> +[<b>new</b> in 1.5.2]</font> +<br> +-- Recursive directory creation (create required intermediary dirs); os.error +if fails. +<br>renames(old, new)<font size=-1> +[<b>new</b> in 1.5.2]</font> +<br> +-- Recursive directory or file renaming; os.error if fails. +<p> +<hr> +<center><a NAME="posixModule"></a><b><i><font size=+2>posix</font></i></b></center> +don't import this module directly, import <i>os</i> instead ! +<p><b>Variables:</b> +<pre>environ -- dictionary of environment variables, e.g. + posix.environ['HOME']. [Windows: before release 1.52 case is significant; from 1.52, + os.environ is all uppercase but accesses are case insensitive] + +error -- exception raised on POSIX-related error. + Corresponding value is tuple of errno code and + perror() string.</pre> +<b>Some Functions (see doc for more):</b> +<pre>chdir(path) -- change current directory to <path>. +chmod(path, mode) + -- change the mode of <path> to the numeric <mode> +close(fd) -- Close file descriptor <fd> opened with posix.open. +_exit(n) -- Immediate exit, with no cleanups, no SystemExit, + etc. Should use this to exit a child process. +execv(p, args) -- "Become" executable <p> with args <args> +getcwd() -- return a string representing the current working directory +getpid() -- return the current process id +fork() -- Like C's fork(). Returns 0 to child, child pid to parent. + [Not on Windows] +kill(pid, signal) + -- Like C's kill [Not on Windows] +listdir(path) -- List names of entries in directory <path>. +lseek(fd, pos, how) + -- set current position in file <fd> to position <pos>, expressed + as an offset relative to beginning of file (how=0), to + current position (how=1), or to end of file (how=2) +mkdir(path[, mode]) + -- Creates a directory named <path> with numeric <mode> + (default 0777) +open(file, flags, mode) + -- Like C's open(). Returns file descriptor. Use file object fcts + rather than this low level ones. +pipe() -- Creates pipe. Returns pair of file descriptors (r, w) [Not on Windows]. +popen(command, mode='r', buffSize=0) + -- Open a pipe to or from <command>. Result is a file + object to read to or write from, as indicated by + <mode> being 'r' or 'w'. +remove(path) -- see unlink. +rename(src, dst)-- Rename/move the file or directory <src> to <dst>. [error if + target name already exists] +rmdir(path) -- Remove the directory <path> +read(fd, n) -- Read <n> bytes from <fd> and return as string. +stat(path) -- Returns st_mode, st_ino, st_dev, st_nlink, st_uid, + st_gid, st_size, st_atime, st_mtime, st_ctime. + [st_ino, st_uid, st_gid are dummy on Windows] +system(command) -- Execute string <command> in a subshell. Returns exit + status of subshell. +times() -- return accumulated CPU times in sec (user, system, children's user, + children's sys, elapsed real time). [3 last not on Windows] +unlink(path) -- Unlink ("delete") path/file. same as: remove +utime(path, (aTime, mTime)) + -- Set the access & modified time of the file to the given tuple of values. +wait() -- Wait for child process completion. Returns tuple of + pid, exit_status [Not on Windows] +waitpid(pid, options) + -- Wait for process pid to complete. Returns tuple of + pid, exit_status [Not on Windows] +write(fd, str) -- Write <str> to <fd>. Returns num bytes written.</pre> + +<hr> +<center><a NAME="posixpathModule"></a><b><i><font size=+2>posixpath</font></i></b></center> +Do not import this module directly, import <i>os</i> instead and refer +to this module as os.path. (e.g. os.path.exists(p)) ! +<p><b>Some Functions (see doc for more):</b> +<pre>exists(p) -- True if string <p> is an existing path +expanduser(p) -- Returns string that is (a copy of) <p> with "~" expansion done. +expandvars(p) -- Returns string that is (a copy of) <p> with environment vars expanded. + [Windows: case significant; Use Unix: <b>$</b>var notation,not %var%] +getsize(filename)<font size=-1> [<b>new</b> in 1.5.2] +</font> -- return the size in bytes of <filename>. raise os.error. +getmtime(filename) <font size=-1> [<b>new</b> in 1.5.2] +</font> -- return last modification time of <filename> (integer nb of seconds since epoch). +getatime(filename) <font size=-1> [<b>new</b> in 1.5.2] +</font> -- return last access time of <filename> (integer nb of seconds since epoch). +isabs(p) -- True if string <p> is an absolute path. +isdir(p) -- True if string <p> is a directory. +islink(p) -- True if string <p> is a symbolic link. +ismount(p) -- True if string <p> is a mount point [true for all dirs on Windows]. +join(p[,q[,...]]) + -- Joins one or more path components intelligently. +split(p) -- Splits into (head, tail) where <tail> is last + pathname component and <head> is everything leading + up to that. <=> (dirname(p), basename(p)) +splitdrive(p) -- Splits path in a pair ('drive:', tail) [on Windows] +splitext(p) -- Splits into (root, ext) where last comp of <root> + contains no periods and <ext> is empty or starts + with a period. +walk(p, visit, arg) + -- Calls the function <visit> with arguments + (<arg>, <dirname>, <names>) for each directory recursively in + the directory tree rooted at <p> (including p itself if it's a dir) + The argument <dirname> specifies the visited directory, the argument + <names> lists the files in the directory. The <visit> function may + modify <names> to influence the set of directories visited below + <dirname>, e.g., to avoid visiting certain parts of the tree. +[1.52, NT version: samefile(), sameopenfile(), samestat() deprecated because not reliable]</pre> + +<center> +<hr WIDTH="100%"><a NAME="timeModule"></a><b><i><font size=+2>time</font></i></b></center> + +<p><b>Variables</b> +<pre>altzone -- signed offset of local DST timezone in sec west of the 0th meridian. +daylight -- nonzero if a DST timezone is specified</pre> +<b>Functions</b> +<pre>time() -- return a float representing UTC time in seconds since the epoch. +gmtime(secs), localtime(secs) + -- return a tuple representing time : (year aaaa, month(1-12), + day(1-31), hour(0-23), minute(0-59), second(0-59), weekday + (0-6, 0 is monday), Julian day(1-366), daylight flag(-1,0 or 1)) +asctime(timeTuple), +strftime(format, timeTuple) + -- return a formated string representing time. +mktime(tuple) -- inverse of localtime(). Return a float. +strptime(string[, format]) <font size=-1> [<b>new</b> in 1.5.2] +</font> -- parse a formated string representing time, return tuple as in gmtime(). +sleep(secs) -- Suspend execution for <secs> seconds. <secs> can be a float.</pre> + +<pre>and also: clock, ctime.</pre> + +<hr> +<center><a NAME="stringModule"></a><b><i><font size=+2>string</font></i></b></center> + +<p><b>Some Variables:</b> +<pre>digits -- The string '0123456789' +hexdigits, octdigits -- legal hexadecimal & octal digits +letters +uppercase +lowercase +whitespace + -- Strings containing the appropriate characters +index_error -- Exception raised by index() if substr not found.</pre> + +<pre><b>Some Functions:</b> +expandtabs(s, tabSize) -- returns a copy of string <s> with tabs expanded. +find/rfind(s, sub[, start=0[, end=0]) + -- Return the lowest/highest index in <s> where the substring + <sub> is found such that <sub> is wholly contained in + s[start:end]. Return -1 if <sub> not found. +ljust/rjust/center(s, width) + -- Return a copy of string <s> left/right justified/centerd in a + field of given width, padded with spaces. <s> is never + truncated. +lower/upper(s) -- Return a string that is (a copy of) <s> in lowercase/uppercase +split(s[, sep=whitespace[, maxsplit=0]]) + -- Return a list containing the words of the string <s>, + using the string <sep> as a separator. +join(words[, sep=' ']) -- Concatenate a list or tuple of words with intervening + separators; inverse of split. +replace(s, old, new[, maxsplit=0] + -- Returns a copy of string <s> with all occurences of substring + <old> replaced by <new>. Limits to <maxsplit> first + substitutions if specified. +strip(s) -- Return a string that is (a copy of) <s> without leading + and trailing whitespace. see also lstrip, rstrip.</pre> + +<hr> +<center><a NAME="reModule"></a><b><i><font size=+2>re</font></i></b></center> +Patterns are specified as strings. Tip: Use raw strings (e.g. r'\w*') to +litteralize backslashes. +<p><b>Regular Expression Syntax:</b> +<pre>. matches any character (including newline if DOTALL flag specified) +^ matches start of the string (of every line in MULTILINE mode) +$ matches end of the string (of every line in MULTILINE mode) +* 0 or more of preceding regular expression (as <b>many</b> as possible) ++ 1 or more of preceding regular expression (as <b>many</b> as possible) +? 0 or 1 occurence of preceding regular expression +*?, +?, ?? Same as *, + and ? but matches as <b>few</b> characters as possible +{m,n} matches from m to n repetitions of preceding RE +{m,n}? idem, attempting to match as <b>few</b> repetitions as possible +[ ] defines character set: e.g. '[a-zA-Z]' to match all letters + (see also \w \S) +[^ ] defines complemented character set: matches if char is NOT in set +\ escapes special chars '*?+&$|()' and introduces special sequences + (see below). Due to Python string rules, write as '\\' or + r'\' in the pattern string. +\\ matches a litteral '\'; due to Python string rules, write as '\\\\' + in pattern string, or better using raw string: r'\\'. +| specifies alternative: 'foo|bar' matches 'foo' or 'bar' +(...) matches any RE inside (), and delimits a <i>group</i>. +(?:...) idem but does'nt delimit a <i>group</i>. +(?=...) matches if ... matches next, but doesn't consume any of the string + e.g. 'Isaac (?=Asimov)' matches 'Isaac' only if followed by 'Asimov'. +(?!...) matches if ... <b>doesn't</b> match next. Negative of (?=...) +(?P<<i>name</i>>...) matches any RE inside (), and delimits a <b>named</b> <i>group</i>. + (e.g. r'(?P<id>[a-zA-Z_]\w*)' defines a group named <i>id</i>) +(?P=<i>name</i>) matches whatever text was matched by the earlier group named <i>name</i>. +(?#...) A comment; ignored. +(?<i>letter</i>) <i>letter</i> is one of 'i','L', 'm', 's', 'x'. Set the corresponding flags + (re.I, re.L, re.M, re.S, re.X) for the entire RE.</pre> + +<pre> <u>SPECIAL SEQUENCES</u>: +\<i>number</i> matches content of the <i>group</i> of the same number; groups are numbered + starting from 1 +\A matches only at the start of the string +\b empty str at beg or end of <i>word</i>: '\bis\b' matches 'is', but not 'his' +\B empty str NOT at beginning or end of word +\d any decimal digit (<=> [0-9]) +\D any non-decimal digit char (<=> [^O-9]) +\s any whitespace char (<=> [ \t\n\r\f\v]) +\S any non-whitespace char (<=> [^ \t\n\r\f\v]) +\w any alphaNumeric char (depends on LOCALE flag) +\W any non-alphaNumeric char (depends on LOCALE flag) +\Z matches only at the end of the string</pre> +<b>Variables:</b> +<pre>error -- Exception when pattern string isn't a valid regexp.</pre> +<b>Functions:</b> +<pre><a NAME="re.compile"></a>compile(pattern[, flags=0]) + -- Compile a RE pattern string into a <i><a href="#regExpObj">regular expression object</a></i>. + Flags (combinable by |): + I or IGNORECASE or (?i): case insensitive matching + L or LOCALE or (?L): make \w, \W, \b, \B dependent on the + current locale + M or MULTILINE or (?m): matches every new line and not only + start/end of the whole string + S or DOTALL or (?s): '.' matches ALL chars, including newline + X or VERBOSE or (?x)</pre> + +<pre>escape(string) -- return (a copy of) string with all non-alphanumerics backslashed. +match(pattern, string[, flags]) + -- if 0 or more chars at <b>beginning</b> of <string> match the RE pattern string, + return a corresponding <i><a href="#matchObject">MatchObject</a></i> instance, or None if no match. +search(pattern, string[, flags]) + --scan thru <string> for a location matching <pattern>, return a + corresponding <i><a href="#matchObject">MatchObject</a></i> instance, or None if no match. +split(pattern, string[, maxsplit=0]) + --split <string> by occurrences of <pattern>. If capturing () are used in + pattern, then occurrences of patterns or subpatterns are also returned. +findall(pattern, string) [<b>new</b> in 1.5.2] + --return a list of non-overlapping matches in <pattern>, either a list of + groups or a list of tuples if the pattern has more than 1 group. +sub(pattern, repl, string[, count=0]) + --return string obtained by replacing the (<count> first) lefmost non- + overlapping occurrences of <pattern> (a string or a RE object) in <string> + by <repl>; <repl> can be a string or a fct called with a single <i><a href="#matchObject">MatchObj +</a></i> arg, which must return the replacement string. +subn(pattern, repl, string[, count=0]) + + --same as sub(), but returns a tuple (newString, numberOfSubsMade)</pre> +<a NAME="regExpObj"></a><b>Regular Expression Objects</b> +<br>(RE objects are returned by the <a href="#re.compile">compile</a> fct) +<p><b>Attributes:</b> +<pre>flags -- flags arg used when RE obj was compiled, or 0 if none provided +groupindex -- dictionary of {group name: group number} in pattern +pattern -- pattern string from which RE obj was compiled</pre> +<b>Methods:</b> +<pre>match(string[, pos][, endpos]) +search(string[, pos][, endpos]) +split(string[, maxsplit=0]) +findall(string) [<b>new</b> in 1.5.2] +sub(repl, string[, count=0]) +subn(repl, string[, count=0]) -- see equivalent functions.</pre> +<a NAME="matchObject"></a><b>Match Objects</b> +<br>(Match objects are returned by the match & search functions) +<p><b>Attributes:</b> +<pre>pos -- value of pos passed to search or match functions; index into + string at which RE engine started search. +endpos -- value of endpos passed to search or match functions; index into + string beyond which RE engine won't go. +re -- RE object whose match or search fct produced this MatchObj instance +string -- string passed to match() or search()</pre> +<b>Methods:</b> +<pre>group([g1, g2, ...]) + -- returns one or more groups of the match. If <b>one</b> arg, result is a string; + if multiple args, result is a tuple with one item per arg. If <i>gi</i> is 0, + return value is entire matching string; if 1 <= <i>gi</i> <= 99, return + string matching group #<i>gi</i> (or None if no such group); <i>gi</i> may also be + a group <i>name</i>. +groups() -- returns a tuple of all groups of the match; groups not participating + to the match have a value of None. Returns a string instead of tuple + if len(tuple)=1 +start(group) +end(group) -- returns indices of start & end of substring matched by group (or None + if group exists but doesn't contribute to the match) +span(group) -- returns the 2-tuple (start(group), end(group)); can be (None, None) + if group didn't contibute to the match.</pre> + +<hr> +<center><a NAME="mathModule"></a><b><i><font size=+2>math</font></i></b></center> + +<p><b>Variables:</b> +<pre>pi +e</pre> +<b>Functions (see ordinary C man pages for info):</b> +<pre>acos(x) +asin(x) +atan(x) +atan2(x, y) +ceil(x) +cos(x) +cosh(x) +exp(x) +fabs(x) +floor(x) +fmod(x, y) +frexp(x) -- Unlike C: (float, int) = frexp(float) +ldexp(x, y) +log(x) +log10(x) +modf(x) -- Unlike C: (float, float) = modf(float) +pow(x, y) +sin(x) +sinh(x) +sqrt(x) +tan(x) +tanh(x)</pre> + +<hr> +<center><a NAME="getoptModule"></a><b><i><font size=+2>getopt</font></i></b></center> + +<p><b>Functions:</b> +<pre>getopt(list, optstr) -- Similar to C. <optstr> is option + letters to look for. Put ':' after letter + if option takes arg. E.g. + # invocation was "python test.py -c hi -a arg1 arg2" + opts, args = getopt.getopt(sys.argv[1:], 'ab:c:') + # opts would be + [('-c', 'hi'), ('-a', '')] + # args would be + ['arg1', 'arg2']</pre> + +<pre> +<hr></pre> + +<h2> +<a NAME="OtherModules"></a>List of modules in base distribution</h2> + +<h3> +Contents of Lib directory<br> +<font size=-1>(Python 1.52 NT distribution, may be slightly different in +other distributions)</font></h3> + +<pre>aifc -- Stuff to parse AIFF-C and AIFF files. +anydbm -- Generic interface to all dbm clones. (dbhash, gdbm, dbm,dumbdbm) +asynchat -- Support for 'chat' style protocols +asyncore -- Asynchronous File I/O (in <i>select</i> style) +audiodev -- Audio support for a few platforms. +base64 -- Conversions to/from base64 RFC-MIME transport encoding . +BaseHTTPServer -- Base class forhttp services. +Bastion -- "Bastionification" utility (control access to instance vars) +bdb -- A generic Python debugger base class. +binhex -- Macintosh binhex compression/decompression. +bisect -- List bisection algorithms. +calendar -- Calendar printing functions. +cgi -- Wraps the WWW Forms Common Gateway Interface (CGI). +CGIHTTPServer -- CGI http services. +cmd -- A generic class to build line-oriented command interpreters. +cmp -- Efficiently compare files, boolean outcome only. +cmpcache -- Same, but caches 'stat' results for speed. +code -- Utilities needed to emulate Python's interactive interpreter +colorsys -- Conversion functions between RGB and other color systems. +commands -- Tools for executing UNIX commands . +compileall -- Force "compilation" of all .py files in a directory. +ConfigParser -- Configuration file parser (much like windows .ini files) +copy -- Generic shallow and deep copying operations. +copy_reg -- Helper to provide extensibility for pickle/cPickle. +dbhash -- (g)dbm-compatible interface to bsdhash.hashopen. +dircache -- Sorted list of files in a dir, using a cache. +dircmp -- Defines a class to build directory diff tools on. +dis -- Bytecode disassembler. +dospath -- Common operations on DOS pathnames. +dumbdbm -- A dumb and slow but simple dbm clone. +dump -- Print python code that reconstructs a variable. +exceptions -- Class based built-in exception hierarchy. +fileinput -- Helper class to quickly write a loop over all standard input files. +find -- Find files directory hierarchy matching a pattern. +fnmatch -- Filename matching with shell patterns. +formatter -- A test formatter. +fpformat -- General floating point formatting functions. +ftplib -- An FTP client class. Based on RFC 959. +getopt -- Standard command line processing. +getpass -- Utilities to get a password and/or the current user name. +glob -- filename globbing. +gopherlib -- Gopher protocol client interface. +grep -- 'grep' utilities. +gzip -- Read & write gzipped files. +htmlentitydefs -- Proposed entity definitions for HTML. +htmllib -- HTML parsing utilities. +httplib -- HTTP client class. +ihooks -- Hooks into the "import" mechanism. +imaplib -- IMAP4 client.Based on RFC 2060. +imghdr -- Recognizing image files based on their first few bytes. +keyword -- List of Python keywords. +knee -- A Python re-implementation of hierarchical module import. +linecache -- Cache lines from files. +locale -- Support for number formatting using the current locale settings. +macpath -- Pathname (or related) operations for the Macintosh. +macurl2path -- Mac specific module for conversion between pathnames and URLs. +mailbox -- A class to handle a unix-style or mmdf-style mailbox. +mailcap -- Mailcap file handling (RFC 1524). +mhlib -- MH (mailbox) interface. +mimetools -- Various tools used by MIME-reading or MIME-writing programs. +mimetypes -- Guess the MIME type of a file. +MimeWriter -- Generic MIME writer. +mimify -- Mimification and unmimification of mail messages. +multifile -- Class to make multi-file messages easier to handle. +mutex -- Mutual exclusion -- for use with module sched. +netrc -- +nntplib -- An NNTP client class. Based on RFC 977. +ntpath -- Common operations on DOS pathnames. +nturl2path -- Mac specific module for conversion between pathnames and URLs. +os -- Either mac, dos or posix depending system. +packmail -- Create a self-unpacking shell archive. +pdb -- A Python debugger. +pickle -- Pickling (save and restore) of Python objects (a faster C + implementation exists in built-in module: cPickle). +pipes -- Conversion pipeline templates. +poly -- Polynomials. +popen2 -- variations on pipe open. +poplib -- A POP3 client class. Based on the J. Myers POP3 draft. +posixfile -- Extended (posix) file operations. +posixpath -- Common operations on POSIX pathnames. +pprint -- Support to pretty-print lists, tuples, & dictionaries recursively. +profile -- Class for profiling python code. +pstats -- Class for printing reports on profiled python code. +pty -- Pseudo terminal utilities. +py_compile -- Routine to "compile" a .py file to a .pyc file. +pyclbr -- Parse a Python file and retrieve classes and methods. +Queue -- A multi-producer, multi-consumer queue. +quopri -- Conversions to/from quoted-printable transport encoding. +rand -- Don't use unless you want compatibility with C's rand(). +random -- Random variable generators (obsolete, use whrandom) +re -- Regular Expressions. +reconvert -- Convert old ("regex") regular expressions to new syntax ("re"). +regex_syntax -- Flags for regex.set_syntax(). +regexp -- Backward compatibility for module "regexp" using "regex". +regsub -- Regular expression subroutines. +repr -- Redo repr() but with limits on most sizes. +rexec -- Restricted execution facilities ("safe" exec, eval, etc). +rfc822 -- RFC-822 message manipulation class. +rlcompleter -- Word completion for GNU readline 2.0. +sched -- A generally useful event scheduler class. +sgmllib -- A parser for SGML. +shelve -- Manage shelves of pickled objects. +shlex -- Lexical analyzer class for simple shell-like syntaxes. +shutil -- Utility functions usable in a shell-like program. +SimpleHTTPServer-- Simple extension to base http class +site -- Append module search paths for third-party packages to sys.path. +smtplib -- SMTP Client class (RFC 821) +sndhdr -- Several routines that help recognizing sound. +SocketServer -- Generic socket server classes. +stat -- Constants and functions for interpreting stat/lstat struct. +statcache -- Maintain a cache of file stats. +statvfs -- Constants for interpreting statvfs struct as returned by os.statvfs() + and os.fstatvfs() (if they exist). +string -- A collection of string operations. +StringIO -- File-like objects that read/write a string buffer (a faster + C implementation exists in built-in module: cStringIO). +sunau -- Stuff to parse Sun and NeXT audio files. +sunaudio -- Interpret sun audio headers. +symbol -- Non-terminal symbols of Python grammar (from "graminit.h"). +telnetlib -- TELNET client class. Based on RFC 854. +tempfile -- Temporary file name allocation. +threading -- Proposed new higher-level threading interfaces +threading_api -- (doc of the threading module) +toaiff -- Convert "arbitrary" sound files to AIFF files . +token -- Tokens (from "token.h"). +tokenize -- Compiles a regular expression that recognizes Python tokens. +traceback -- Format and print Python stack traces. +tty -- Terminal utilities. +turtle -- LogoMation-like turtle graphics +types -- Define names for all type symbols in the std interpreter. +tzparse -- Parse a timezone specification. +urllib -- Open an arbitrary URL. +urlparse -- Parse URLs according to latest draft of standard. +user -- Hook to allow user-specified customization code to run. +UserDict -- A wrapper to allow subclassing of built-in dict class. +UserList -- A wrapper to allow subclassing of built-in list class. +util -- some useful functions that don't fit elsewhere !! +uu -- UUencode/UUdecode. +wave -- Stuff to parse WAVE files. +whatsound -- Several routines that help recognizing sound files. +whichdb -- Guess which db package to use to open a db file. +whrandom -- Wichmann-Hill random number generator. +xdrlib -- Implements (a subset of) Sun XDR (eXternal Data Representation) +xmllib -- A parser for XML, using the derived class as static DTD. +zmod -- Demonstration of abstruse mathematical concepts.</pre> + +<h3> + +<hr WIDTH="100%"></h3> + +<h3> +<font size=-1>(following list not revised)<br> +<br> +</font>* Built-ins *</h3> + +<pre> sys Interpreter state vars and functions + __built-in__ Access to all built-in python identifiers + __main__ Scope of the interpreters main program, script or stdin + array Obj efficiently representing arrays of basic values + math Math functions of C standard + time Time-related functions + regex Regular expression matching operations + marshal Read and write some python values in binary format + struct Convert between python values and C structs</pre> + +<h3> +* Standard *</h3> + +<pre> getopt Parse cmd line args in sys.argv. A la UNIX 'getopt'. + os A more portable interface to OS dependent functionality + re Functions useful for working with regular expressions + string Useful string and characters functions and exceptions + whrandom Wichmann-Hill pseudo-random number generator + thread Low-level primitives for working with process threads + threading idem, new recommanded interface.</pre> + +<h3> +* Unix/Posix *</h3> + +<pre> dbm Interface to Unix ndbm database library + grp Interface to Unix group database + posix OS functionality standardized by C and POSIX standards + posixpath POSIX pathname functions + pwd Access to the Unix password database + select Access to Unix select multiplex file synchronization + socket Access to BSD socket interface</pre> + +<h3> +* Tk User-interface Toolkit *</h3> + +<pre> tkinter Main interface to Tk</pre> + +<h3> +* Multimedia *</h3> + +<pre> audioop Useful operations on sound fragments + imageop Useful operations on images + jpeg Access to jpeg image compressor and decompressor + rgbimg Access SGI imglib image files</pre> + +<h3> +* Cryptographic Extensions *</h3> + +<pre> md5 Interface to RSA's MD5 message digest algorithm + mpz Interface to int part of GNU multiple precision library + rotor Implementation of a rotor-based encryption algorithm</pre> + +<h3> +* Stdwin * Standard Window System</h3> + +<pre> stdwin Standard Window System interface + stdwinevents Stdwin event, command, and selection constants + rect Rectangle manipulation operations</pre> + +<h3> +* SGI IRIX * (4 & 5)</h3> + +<pre> al SGI audio facilities + AL al constants + fl Interface to FORMS library + FL fl constants + flp Functions for form designer + fm Access to font manager library + gl Access to graphics library + GL Constants for gl + DEVICE More constants for gl + imgfile Imglib image file interface</pre> + +<h3> +* Suns *</h3> + +<pre> sunaudiodev Access to sun audio interface</pre> + +<hr WIDTH="100%"> +<h2> +<a NAME="Workspace"></a>Workspace exploration and idiom hints</h2> + +<pre> dir(<module>) list functions, variables in <module> + dir() get object keys, defaults to local name space + X.__methods__ list of methods supported by X (if any) + X.__members__ List of X's data attributes + if __name__ == '__main__': main() invoke main if running as script + map(None, lst1, lst2, ...) merge lists + b = a[:] create copy of seq structure + _ in interactive mode, is last value printed + + + + + + + + +<hr></pre> + +<h2> +<a NAME="Emacs"></a>Python Mode for Emacs</h2> + +<pre><b><font size=-1>(Not revised, possibly not up to date)</font></b></pre> + +<pre>Type C-c ? when in python-mode for extensive help. + +INDENTATION + +Primarily for entering new code: + TAB indent line appropriately + LFD insert newline, then indent + DEL reduce indentation, or delete single character + +Primarily for reindenting existing code: + C-c : guess py-indent-offset from file content; change locally + C-u C-c : ditto, but change globally + + C-c TAB reindent region to match its context + C-c < shift region left by py-indent-offset + C-c > shift region right by py-indent-offset + + +MARKING & MANIPULATING REGIONS OF CODE + +C-c C-b mark block of lines +M-C-h mark smallest enclosing def +C-u M-C-h mark smallest enclosing class +C-c # comment out region of code +C-u C-c # uncomment region of code + +MOVING POINT + +C-c C-p move to statement preceding point +C-c C-n move to statement following point +C-c C-u move up to start of current block +M-C-a move to start of def +C-u M-C-a move to start of class +M-C-e move to end of def +C-u M-C-e move to end of class + +EXECUTING PYTHON CODE + +C-c C-c sends the entire buffer to the Python interpreter +C-c | sends the current region +C-c ! starts a Python interpreter window; this will be used by + subsequent C-c C-c or C-c | commands + +VARIABLES + +py-indent-offset indentation increment +py-block-comment-prefix comment string used by py-comment-region + +py-python-command shell command to invoke Python interpreter +py-scroll-process-buffer t means always scroll Python process buffer +py-temp-directory directory used for temp files (if needed) + + +py-beep-if-tab-change ring the bell if tab-width is changed</pre> + +<hr> +<h2> +<a NAME="Debugger"></a>The Python Debugger</h2> + +<pre><b><font size=-1>(Not revised, possibly not up to date, see 1.5.2 Library Ref section 9.1; in 1.5.2, you may also use debugger integrated in IDLE)</font></b></pre> + +<h3> +Accessing</h3> + +<pre>import <b>pdb</b> (it's a module written in Python) + + -- defines <b>functions : +</b> run(statement[,globals[, locals]]) + -- execute statement string under debugger control, with optional + global & local environment. + runeval(expression[,globals[, locals]]) + -- same as run, but evaluate expression and return value. + runcall(function[, argument, ...]) + -- run function object with given arg(s) + pm() -- run postmortem on last exception (like debugging a core file) + post_mortem(t) + -- run postmortem on traceback object <t> + + -- defines <b>class Pdb : +</b> use Pdb to create reusable debugger objects. Object + preserves state (i.e. break points) between calls. + + + runs until a breakpoint hit, exception, or end of program + If exception, variable '__exception__' holds (exception,value).</pre> + +<h3> +Commands</h3> + +<pre>h, help + brief reminder of commands +b, break [<arg>] + if <arg> numeric, break at line <arg> in current file + if <arg> is function object, break on entry to fcn <arg> + if no arg, list breakpoints +cl, clear [<arg>] + if <arg> numeric, clear breakpoint at <arg> in current file + if no arg, clear all breakpoints after confirmation +w, where + print current call stack +u, up + move up one stack frame (to top-level caller) +d, down + move down one stack frame +s, step + advance one line in the program, stepping into calls +n, next + advance one line, stepping over calls +r, return + continue execution until current function returns + (return value is saved in variable "__return__", which + can be printed or manipulated from debugger) +c, continue + continue until next breakpoint +a, args + print args to current function +rv, retval + prints return value from last function that returned +p, print <arg> + prints value of <arg> in current stack frame +l, list [<first> [, <last>]] + List source code for the current file. + Without arguments, list 11 lines around the current line + or continue the previous listing. + With one argument, list 11 lines starting at that line. + With two arguments, list the given range; + if the second argument is less than the first, it is a count. +whatis <arg> + prints type of <arg> +! + executes rest of line as a Python statement in the current stack frame +q quit + immediately stop execution and leave debugger + +<return> + executes last command again + +Any input debugger doesn't recognize as a command is assumed to be a +Python statement to execute in the current stack frame, the same way +the exclamation mark ("!") command does.</pre> + +<h3> +Example</h3> + +<pre>(1394) python +Python 1.0.3 (Sep 26 1994) +Copyright 1991-1994 Stichting Mathematisch Centrum, Amsterdam +>>> import rm +>>> rm.run() +Traceback (innermost last): + File "<stdin>", line 1 + File "./rm.py", line 7 + x = div(3) + File "./rm.py", line 2 + return a / r +ZeroDivisionError: integer division or modulo +>>> import pdb +>>> pdb.pm() +> ./rm.py(2)div: return a / r +(Pdb) list + 1 def div(a): + 2 -> return a / r + 3 + 4 def run(): + 5 global r + 6 r = 0 + 7 x = div(3) + 8 print x +[EOF] +(Pdb) print r +0 +(Pdb) q +>>> pdb.runcall(rm.run) +etc.</pre> + +<h3> +Quirks</h3> +Breakpoints are stored as filename, line number tuples. If a module is +reloaded after editing, any remembered breakpoints are likely to be wrong. +<p>Always single-steps through top-most stack frame. That is, "c" acts +like "n". +</body> +</html> diff --git a/quick-ref1_52.ps b/quick-ref1_52.ps new file mode 100644 index 0000000..f3254a0 --- /dev/null +++ b/quick-ref1_52.ps @@ -0,0 +1,3347 @@ +%! +%%Title: A Python Quick Reference +%%Creator: html2ps version 1.0 beta1 +%%EndComments +save +2000 dict begin +/d {bind def} bind def +/D {def} d +/t true D +/f false D +/FL [/Times-Roman +/Times-Italic +/Times-Bold +/Times-BoldItalic +/Courier +/Courier-Oblique +/Courier-Bold +/Courier-BoldOblique +/Helvetica +/Helvetica-Oblique +/Helvetica-Bold +/Helvetica-BoldOblique] D +/WF t D +/WI 0 D +/F 1 D +/IW 453 F div D +/IL 671 F div D +/PS 842 D +/EF [0 1 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 2 2] D +/EZ [11 9 19 17 15 13 12 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 8 8] D +/Ey [0 0 2 2 2 2 2 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0] D +/EG [-1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1] D +/Tm [1 1 0.8 0.8 0.8 0.8 0.8 0.8 0 0 0 0 0 0 0.5 1 1 1 1 0 0 1.3 0 0] D +/Bm [1 1 0.5 0.5 0.5 0.5 0.5 0.5 0 0 0 0 0 0 0.5 1 1 1 1 0 0 1 0 0] D +/Lm [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 2 2 0 0 2 0 0 0] D +/Rm [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0] D +/EU [-1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 0 0] D +/NO t D +/YY [[{()}1][{()}0][{()}2]] D +/ZZ [[{()}1][{()}0][{()}2]] D +/Ts EZ 0 get D +/TU f D +/Xp t D +/AU f D +/SN 0 D +/Cf f D +/Fe f D +/TI 1 Ts mul D +/FE {newpath -14 14 M CP BB 467 14 L 467 -685 L CP BB -14 -685 L closepath} D +/LA {TU PM 0 eq and{IW 56 F div add SA{Sf div}if 0 translate} + {71 757 translate F SA{Sf mul}if dup scale + CS CF FS Cf{CA CL get VC}if /Bb f D}ie 0 0 M TF not Tc or + {Cf{gsave SA{1 Sf div dup scale}if Cb VC FE fill grestore}if Df{Sd}if}if} D +/Pi 0 Ts mul D +/SG [0.8 1 1] D +/Ab 15 D +/J 0 D +/Tc f D +/NH 6 D +/Nf f D +/Pa f D +/LH 1.2 D +/XR f D +/Xr {/pN E D ( [p ) WB pN WB (] )WB} D +/Db [16#FF 16#FF 16#FF] D +/Dt [16#00 16#00 16#00] D +/eA f D +/Lc t D +/Dl [16#00 16#00 16#00] D +/LX f D +/Br 0.25 D +/IA ([IMAGE]) D +/DS {/PF f D()WB NL NP()pop RC ZF} D +/Gb f D +/Mb f D +/Hc [16#00 16#00 16#00] D +/Bl 3 D +/MI -15.2 D +/DX (DRAFT) D +/Di 0 D +/FD 2 D +/Dy 2 D +/cD [16#F0 16#F0 16#F0] D +/FW 0.6 D +/FU [16#00 16#00 16#00] D +/ET {/RM f D /A0 0 D /PN SN D /OU t D /Ou t D /W IW D /LL W D D1 + Ms not TP and{Ip}if /TF f D} D +[{true statusdict/setduplexmode get exec} stopped cleartomark +[{true statusdict/settumble get exec} stopped cleartomark +%-- End of variable part -- +/Cd {aload length 2 idiv dup dict begin {D} repeat currentdict end} D +/EX {EC cvx exec} D +/DU {} d +/BB {pop pop}d +/ie {ifelse} d +/E {exch} d +/M {moveto} d +/R {rmoveto} d +/L {lineto} d +/RL {rlineto} d +/CP {currentpoint} d +/SW {stringwidth} d +/GI {getinterval} d +/PI {putinterval} d +/Sg {setgray} d +/LW {setlinewidth} d +/S {dup () ne OU and{0 Co R AT 3 eq LB and HF not and A1 0 ne A2 0 ne or and + {A2 0 32 A1 0 6 -1 roll awidthshow}{show}ie 0 Co neg R}{pop}ie + OU PH 3 eq or{/Ms t D}if} D +/U {OU{gsave CP currentfont /FontInfo get /UnderlinePosition get + 0 E currentfont /FontMatrix get dtransform E pop add newpath M dup SW pop + CJ 0 RL stroke grestore}if} D +/B {OU Br 0 gt and{CP Ts neg Ts .33 mul R gsave 0 Sg + CP newpath Ts Br mul 0 360 arc closepath UI 2 mod 0 eq{stroke}{fill}ie + grestore M CP E Ts Br 1 add mul sub E BB /Ms t D}if}D +/NP {Ms TP not or PA and OU and{TP{OR}if f1{mF k2 /mF E D /YC 0 D}if + TP TU not PM 0 eq or and{showpage}if DU Ip TE not{LA}if 0.6 LW + /CI 0 D /TP t D /Hs f D /hl 6 D /hL 6 D /HI hi D /Ms f D}if Bs XO BO M} D +/Np {LE sub CP E pop gt PL 0 eq and{NP}if}D +/Ip {/PN PN 1 add D /Pn RM{1}{4}ie PN Ns D /PM PN SN sub 2 mod D} D +/GP {E dup 3 -1 roll get PN 1 add 2 mod get dup type /integertype eq + {get 0 get}{E pop}ie}d +/Fc {dup 2 GP exec SW pop /S1 E D dup 1 GP exec SW pop /S2 E D 0 GP exec SW + pop /S3 E D S1 0 gt{S2 2 mul S1 add S3 2 mul S1 add 2 copy lt{E}if pop}{0}ie + S2 S3 add 2 copy lt{E}if pop IW .9 mul div dup 1 gt{1 E div}{pop 1}ie}D +/OR {gsave SA{1 Sf div dup scale}if Fe{Cf{FU VC}if FW LW 1 setlinejoin + FE stroke}if /YO {60 F div dup 40 gt{pop 40}if}D /cs CS D /cf CF D /CF 0 D + /pf PF D /PF f D /Fn FN D /At AT D /AT 0 D /FN EF Hf 1 add get D Fz Fs FS ZZ + Fc Fz mul Fs FS EU Hf 1 add get dup type /arraytype eq Cf and{VC}{pop 0 Sg}ie + IW IL neg YO sub M ZZ 1 GP exec dup SW pop neg 0 R Sh 0 IL neg YO sub M + ZZ 0 GP exec Sh ZZ 2 GP exec dup SW pop IW E sub 2 div IL neg YO sub M Sh + Fz Fs FS NO{/AW IW Pn SW pop sub D AW 2 div IL neg YO sub + S1 0 gt S2 AW .45 mul gt or S3 AW .45 mul gt or{Fz 2 mul sub}if M Pn Sh}if + EU Hf get dup type /arraytype eq Cf and{VC}{pop 0 Sg}ie + YY Fc /FN EF Hf get D Hz mul HS FS IW YO M YY 1 GP exec dup SW pop neg 0 R Sh + 0 YO M YY 0 GP exec Sh YY 2 GP exec dup SW pop IW E sub 2 div YO M Sh + /FN Fn D /AT At D t Pb XO SZ SL get neg R /PF pf D grestore /CF 0 D cs cf FS}D +/Sh {dup () ne{CP Hz 4 div sub BB show CP CS add BB}{pop}ie}D +/Pb {/OU E D /Ou OU D /PB t D 0 0 M Ba{/Sa save D /BP t D /Fl t D RC /PL 0 D + /PH 0 D /W IW D /LE IL .7 mul D /EO 0 D SI ZF /YA 0 D /BO 0 D /C1 () D + BA 0 Ts neg R Bb{Xl Yl Xh Yh}if Bb CP Sa restore M + {/Yh E D /Xh E D /Yl E D /Xl E D}if /Fl t D}if + BL /OU t D /HM f D /Ou t D /PB f D} D +/Bs {/BP Ba not D}D +/reencodeISO { + dup dup findfont dup length dict begin{1 index /FID ne{D}{pop pop}ie}forall + /Encoding ISOLatin1Encoding D currentdict end definefont} D +/ISOLatin1Encoding [ +/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef +/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef +/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef +/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef +/space/exclam/quotedbl/numbersign/dollar/percent/ampersand/quoteright +/parenleft/parenright/asterisk/plus/comma/hyphen/period/slash +/zero/one/two/three/four/five/six/seven/eight/nine/colon/semicolon +/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N +/O/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright +/asciicircum/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m +/n/o/p/q/r/s/t/u/v/w/x/y/z/braceleft/bar/braceright/asciitilde +/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef +/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef +/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef +/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef +/.notdef/space/exclamdown/cent/sterling/currency/yen/brokenbar +/section/dieresis/copyright/ordfeminine/guillemotleft/logicalnot +/hyphen/registered/macron/degree/plusminus/twosuperior/threesuperior +/acute/mu/paragraph/periodcentered/cedilla/onesuperior/ordmasculine +/guillemotright/onequarter/onehalf/threequarters/questiondown +/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE/Ccedilla +/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex +/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis +/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute +/Thorn/germandbls/agrave/aacute/acircumflex/atilde/adieresis +/aring/ae/ccedilla/egrave/eacute/ecircumflex/edieresis/igrave +/iacute/icircumflex/idieresis/eth/ntilde/ograve/oacute/ocircumflex +/otilde/odieresis/divide/oslash/ugrave/uacute/ucircumflex/udieresis +/yacute/thorn/ydieresis +] D +[128/backslash 129/parenleft 130/parenright 141/circumflex 142/tilde +143/perthousand 144/dagger 145/daggerdbl 146/Ydieresis 147/scaron 148/Scaron +149/oe 150/OE 151/guilsinglleft 152/guilsinglright 153/quotesinglbase +154/quotedblbase 155/quotedblleft 156/quotedblright 157/endash 158/emdash +159/trademark] +aload length 2 idiv 1 1 3 -1 roll{pop ISOLatin1Encoding 3 1 roll put}for +/colorimage where{pop}{ + /colorimage { + pop pop /Pr E D {/Cv Pr D /Gr Cv length 3 idiv string D 0 1 Gr length 1 sub + {Gr E dup /i E 3 mul D Cv i get 0.299 mul Cv i 1 add get 0.587 mul add + Cv i 2 add get 0.114 mul add cvi put}for Gr} image} D +}ie +/pdfmark where{pop}{userdict /pdfmark /cleartomark load put}ie +WF{FL{reencodeISO D}forall}{4 1 FL length 1 sub{FL E get reencodeISO D}for}ie +/Symbol dup dup findfont dup length dict begin + {1 index /FID ne{D}{pop pop}ie}forall /Encoding [Encoding aload pop] + dup 128 /therefore put D currentdict end definefont D + +/SF {/CS E D SZ SL CS put FO SL FN put /YI CS LH neg mul D dup ST cvs ( ) join + CS ST cvs join C1 E join ( NF ) join /C1 E D CS NF /Wf WF FN 0 gt or D + /BW Wf{( ) SW pop}{0}ie D}D +/NF {/cS E D /cF E D cF 0 ge{FL cF get}{/Symbol}ie + findfont cS scalefont setfont} D +/FS {CF or /CF E D FR SL CF put CF CF 0 ge{FN 4 mul add}if E SF} D +/PC {SH /BP f D fin not GL not and{NL}if /HM t D /LL LS D} D +/BS {/TX E D Wf{/fin f D /CW 0 D /LK 0 D /SC 0 D + /RT TX D {RT ( ) search{/NW E D pop /RT E D /WH NW SW pop D CW WH add LL gt + {TX SC LK SC sub 1 sub NN GI GL{SH cF cS OC + 2 copy cS ne E cF ne or{NF}{pop pop}ie}{PC /CW WH BW add D}ie + /SC LK D} + {GL{JC}if + /CW CW WH add BW add D /HM t D}ie /GL f D /Ph f D + /LK LK NW length 1 add add D}{pop exit}ie}loop + /fin t D TX SC LK SC sub GI SH RT () ne{GL not{CC}if}if + /LC TX length D /WH RT SW pop D CW WH add Hy{HC SW pop add}if LL gt + {RT GL{SH cF cS OC 2 copy cS ne E cF ne or{NF}{pop pop}ie + Hy{/Ph t D}if /LL LS D}{NL /LL LS D SH}ie} + {RT PC Hy{CC}if /Ph Ph Hy or D}ie RT () ne{/GL t D /HM t D}if} + {TX SW pop LL le{TX SH}{/NW () D 0 2 TX length 1 sub + {/CW E D TX 0 CW GI dup SW pop LL gt{pop NW SH /HM t D NL/LL W XO sub MR sub D + /CW CW 2 sub NN D /TX TX CW TX length CW sub GI D TX BS exit} + {/NW E D}ie}for}ie}ie /HM t D}D +/CC {C0 length 0 gt{JC}if /C0 [C1 L1 YA YB Mf NS NB TB AF Bw] D + /C1 () D /L0 L1 D /YA 0 D /YB 0 D /Mf 0 D /NS 0 D /NB 0 D}D +/JC {C0 aload length 0 gt{pop pop pop NB add /NB E D NS add /NS E D + dup Mf gt{/Mf E D}{pop}ie dup YB gt{/YB E D}{pop}ie + dup YA gt{/YA E D}{pop}ie pop C1 join /C1 E D /C0 [] D}if}D +/OC {C0 length 0 gt{C1 L1 L0 sub YA YB Mf NS NB TB AF Bw GL C0 aload pop + /Bw E D /AF E D /TB E D /NB E D /NS E D /Mf E D /YB E D /YA E D /C0 [] D + /L1 E D /C1 E D Ph{HC SH}if NL /GL E D /Bw E D /AF E D /TB E D /NB E D /NS E D + /Mf E D /YB E D /YA E D /L1 E D /LL W L1 sub XO sub MR sub WH sub D /CW 0 D + C1 E join /C1 E D}if}D +/BT {/LB t D dup length string copy RS dup dup () ne E ( ) ne and + {/CI 0 D /LS LL D /LL W L1 sub XO sub MR sub D BS} + {dup ( ) eq{/GL f D}if dup () eq L1 0 eq or{pop}{SH /BP f D /Ph f D}ie}ie + /LB f D} D +/BL {CP E pop XO E M} D +/NL {JC /GL f D /SK W XO sub MR sub L1 sub TB{Bw add}if D + /YA LF{Mf HM Fl not and PF or{LH mul}if}{0 /LF t D}ie YA 2 copy lt{E}if pop D + C1 () ne{/FB YB Mf SA{Sf mul}if 4 div 2 copy lt{E}if pop D}if Fl{/Ya YA D}if + CP E pop YA sub YB sub LE neg lt Fl not and PB not and{NP}if NT TL BL + OU PF not and PB or{/RE L1 TB{Bw sub}if + W XO sub MR sub div YA YB add LE BO add div 2 copy lt{E}if pop D + RE 1 gt{BL 1 RE div dup scale}if}if + AT 2 le{SK AT mul 2 div YA neg R}if + AT 3 eq{0 YA neg R TB{/NB NB 1 sub D /NS NS 1 sub D}if /NB NB 1 sub NN D + /A3 NS 6 mul NB add D NS NB add 0 eq + {/A1 0 D /A2 0 D} + {NS 0 eq{/A1 SK NB div dup J gt{pop 0}if D /A2 0 D}{J A3 mul SK lt + {/A1 J D /A2 SK J NB mul sub NS div dup Ab gt{/A1 0 D pop 0}if D} + {/A1 SK A3 div D /A2 A1 6 mul D}ie}ie}ie /A1 A1 NN D /A2 A2 NN D}if + AT 4 eq{0 YA neg R PH 2 le{PD 0 lt{/PD L1 D}if PD M1 gt{/M1 PD D}if + L1 PD sub M2 gt{/M2 L1 PD sub D}if}{DV ID 1 sub get 0 ge{Lo 0 R}if}ie}if + F0 cF ne Cs cS ne or{F0 Cs NF}if + /ms Ms D /Ms f D CP FB sub + C1 cvx exec XO EO sub L1 add TB{BW sub}if dup LM gt{/LM E D}{pop}ie + PH 0 eq PH 4 eq or Ms and{HF not{/PO t D /AH t D}if + BB CP YA add E AT 3 eq LB and{A1 sub}if TB{BW sub}if E BB} + {pop pop}ie Ms HM PH 3 eq and or{/BP f D /Fl f D}if + /Lo 0 D /L1 0 D /F0 cF D /Cs cS D BP not{0 YB NN neg R}if + OU f1 and mF not and{k2 /f1 f D}if + OU PF not and PB or{RE 1 gt{RE dup scale}if}if /Ms ms Ms or D + /C1 AF{(Cp )}{()}ie D /YA 0 D /YB 0 D BL + AT 4 eq LB not and PH 3 ge and + {ID DV length lt{DV ID get dup 0 ge{DO E sub /Lo E D /L1 Lo D}{pop}ie + /ID ID 1 add D}if}if /T t D CD{/LN LN 1 add D PD}if + /PD -1 D /NS 0 D /NB 0 D /TB f D /Ph f D /Mf 0 D /HM f D} D +/RS {/TM E D /CN 0 D TM{10 eq{TM CN ( ) PI}if /CN CN 1 add D}forall + /CN 0 D /BK HM EN and{0}{1}ie D TM + {dup 32 ne{TM CN 3 2 roll put /CN CN 1 add D /BK 0 D} + {pop BK 0 eq{TM CN 32 put /CN CN 1 add D}if /BK 1 D}ie}forall + TM 0 CN GI dup dup () ne E ( ) ne and + {dup CN 1 sub get 32 eq{/EN f D}{/EN t D}ie}if} D +/join {2 copy length E length add string dup 4 2 roll 2 index 0 3 index + PI E length E PI}d +/WR {(\n) search{dup () ne BP not or + {Li 4 le CP E pop YI Li mul add LE add 0 lt and PL 0 eq and{NP}if + SH NL pop /Li Li 1 sub D WR}{pop pop WR}ie}{SH}ie /CI 0 D /BP f D} D +/SH {dup dup () ne E ( ) ne and PF or CS Mf gt and{/Mf CS D}if + T not Wf and{( ) E join /T t D}if dup BP{/MF CS D}if + AT 3 eq{2 copy length dup 0 gt{/NB E NB add D + {( ) search{/NS NS 1 add D pop pop}{pop exit}ie}loop}{pop pop}ie}if + CD PD 0 lt and{dup DC search{SW pop /PD E L1 add D pop pop}{pop}ie}if + 0 Np dup SW pop L1 add /L1 E D dup () ne + {C1 (\() join E join (\)) join AU AF and UF or Wf and{( U ) join}if + sF{( s ) join}if ( S ) join + /C1 E D dup length 1 sub get 32 eq /TB E D /Bw BW D}{pop pop}ie} D +/BG {AI LG BC add add 0 eq} D +/ON {OU{Ty AR AI NN get dup 1 add Ln Ns Ty 2 mod 0 eq{(. )}{(\) )}ie join + dup SW pop neg 0 R CP E 0 lt{0 E M}{pop}ie CP BB show /Ms t D}if} D +/Ln {AR AI 3 -1 roll put}D +/SP {dup CI lt BP not and{dup CI sub 0 E R /CI E D}{pop}ie} D +/BN {PF{WR /HM f D}{BT NL}ie} D +/NN {dup 0 lt{pop 0}if} D +/h {HI 0 gt{(h) HI ST cvs join cvx exec dup 1 get E + Nf{0 get E join}{pop}ie}{()}ie} D +/H {/fn FN D /Hi E 1 add D 1 sub /HL E D /H2 HL 2 add D /GS EZ H2 get D + E Tm H2 get GS mul BE dup 0 gt{1 sub}{pop EG H2 get dup 0 lt{pop AT}if}ie NA + WW Np /SL SL 1 add D /FN EF H2 get D GS Ey H2 get FS + EU H2 get Sc Hs not HL Hl lt and Hs HL hl lt and or Hi 0 eq or + {/HI Hi D /Hs t D /hl HL D /hL HL D}if HL Hl lt{/hi Hi D}if + Nf HI 0 gt and{(h) Hi ST cvs join cvx exec 0 get WB}if + /HF t D /AH f D /PO f D} D +/EH {Bm H2 get GS mul BE OA /SL SL 1 sub NN D /CF 0 D /FN fn D + SZ SL get FR SL get FS /HF f D /GS Ts D ()Ec} D +/P {E PF{WR}{PO{EP}{BN}ie Ts 4 mul Np AE not{Tm 0 get Ts mul neg SP}if + dup 0 ge AH and{Pi Pd}if}ie 1 sub dup 0 lt{pop AV AL get}if /AT E D /PO t D} D +/EP {PF{WR}{BN Ts 4 mul Np}ie AE not{Bm 0 get Ts mul neg SP}if + /AT AV AL get D /PO f D} D +/BE {E PO{EP}{BN}ie Ts 4 mul Np neg SP} D +/HR {/Aw W EO sub D /RW E dup 0 gt{Aw mul}{neg}ie dup Aw gt{pop Aw}if D /RZ E D + E BN Ts neg SP 1 sub 2 div Aw RW sub mul EO add CP E pop M PF{0 Ps neg R}if + 0 Np OU{gsave RZ LW Cf{Hc VC}{0 Sg}ie CP BB RW 0 RL CP BB stroke grestore}if + /CI 0 D /BP f D PF not{Ts neg SP}if /Ms t D} D +/AD {I NL EG 14 get dup 0 lt{pop AT}if NA /AE t D Tm 14 get Ts mul neg SP + Cf{EU 14 get dup -1 eq{pop CA CL get}if Sc}if} D +/DA {BN ()ES OA /AE f D ()Ec Bm 14 get Ts mul neg SP} D +/PR {/MW E D /Li E D Tm 1 get Ps mul BE 0 NA /FN Fp D /PF t D SI /SL SL 1 add D + /CF 0 D Ps CS mul Ts div MW WC mul CS mul Ts div dup LL gt PL 0 eq and + {LL div div}{pop}ie Ey 1 get FS CP E pop LE add YI neg div cvi dup Li lt + AH and{4 lt YI Li mul 5 mul LE add 0 gt or PL 0 eq and{NP}if}{pop}ie + EU 1 get Sc /GS Ps D}D +/RP {WR NL () /PF f D SI /FN 0 D ES Bm 1 get Ps mul neg SP OA /GS Ts D} D +/SI {/XO Lm 15 get BC NN mul Lm 16 get AI UI sub NN mul add + Lm 17 get UI NN mul add Lm 20 get LG NN mul add Ts mul + PF{Lm 1 get Ps mul add}if EO add D + /MR Rm 15 get BC NN mul Rm 16 get AI UI sub NN mul add + Rm 17 get UI NN mul add Rm 20 get LG NN mul add Ts mul + PF{Rm 1 get Ps mul add}if D /LL W XO sub MR sub D} D +/DT {BN /LG LG 1 sub D SI /LG LG 1 add D WW 2 div Np BL} D +/DD {WB Cc 0 eq L1 0 eq or Lm 20 get Ts mul L1 sub TB{BW add}if Ts 2 div lt or + NL /LF E D SI BL} D +/DL {Dc LG Cc put /Cc E D BG{Tm 18 get Ts mul BE}{BN}ie /LG LG 1 add D BL} D +/LD {BN LG 0 gt{/LG LG 1 sub D}if /Cc Dc LG get D SI + BG{()Bm 18 get Ts mul BE}if BL} D +/UL {BG{Tm 17 get Ts mul BE}{BN}ie NR AI NN 0 put /UI UI 1 add D + /AI AI 1 add D SI BL} D +/LU {BN /UI UI 1 sub D /AI AI 1 sub D SI BG{()Bm 17 get Ts mul BE}if BL} D +/OL {E BG{Tm 16 get Ts mul BE}{BN}ie TR AI NN Ty put /Ty E D NR AI NN 1 put + /AI AI 1 add D SI BL 1 Ln} D +/LO {BN /AI AI 1 sub D /Ty TR AI get D SI BG{()Bm 16 get Ts mul BE}if BL} D +/LI {E BN -1 SP /BP f D /CI 0 D 0 Np NR AI 1 sub NN get 1 eq + {dup dup 0 gt E 4 le and{/Ty E D}{pop}ie + /L1 L1 Ty AR AI NN get Ns SW pop XO sub dup 0 lt{pop 0}if add D ( ON )} + {pop ( B )}ie C1 E join /C1 E D CS Mf gt{/Mf CS D}if BL} D +/BQ {Tm 15 get Ts mul BE /BC BC 1 add D SI BL} D +/QB {Bm 15 get Ts mul BE /BC BC 1 sub D SI BL} D +/Al {E EP 1 sub dup 0 lt{pop AV AL get}if NA} D +/Ea {EP OA} D +/WB {PF{WR}{BT}ie} D +/F1 {WB /FN 0 D CS 0 FS} D +/F2 {WB /FN WI D CS 0 FS} D +/HY {/Hy t D WB /Hy f D} D +/YH {WB} D +/A {/LT E D LT 1 eq{/RN E D}if /Lh E D WB /AF t D /C1 C1 ( Cp ) join D + Lc{Cl Sc}if} D +/EA {Lc AF and{Ec}{WB}ie TL Pa AF and Lh 0 ne and + {( \() Lh join (\)) join /AF f D WB}if /AF f D} D +/TL {C1 ( Tl ) apa /C1 E D} d +/apa {AF OU and Lh 0 ne LT 1 eq or and{LT 1 eq{RN ( /) E ST cvs join} + {(\() Lh join (\)) join}ie E join join}{pop}ie} d +/Cp {/Xc CP /Yc E D D} D +/SS {Cf{dup 0 ge{EU E get dup -1 eq{pop CA CL get}if}{pop CA CL get}ie Sc} + {pop}ie SZ SL get /SL SL 1 add D} D +/I {WB 8 SS 1 FS} D +/EM {WB 8 SS /CF CF 1 xor D 0 FS} D +/BD {WB 9 SS 2 FS} D +/TT {WB 10 SS /FN Fp D 0 FS} D +/KB {WB 11 SS /FN Fp D 2 FS} D +/CT {WB 12 SS 1 FS} D +/SM {WB 13 SS /FN Fp D 0 FS} D +/Q {/QL QL 1 add D QO QL 2 mod get La get join WB} D +/EQ {QC QL 2 mod get La get join WB /QL QL 1 sub D} D +/RO {WB -1 SS /CF 0 D 0 FS} D +/SY {WB -1 SS -1 FS} D +/ES {WB /SL SL 1 sub NN D /CF 0 D /FN FO SL get D SZ SL get FR SL get FS ()Ec}D +/FZ {3 sub 1.2 E exp GS mul E WB TL /C1 C1 ( Cp ) join D /SL SL 1 add D 0 FS} D +/Ef {WB TL ()ES /C1 C1 ( Cp ) join D} D +/BZ {dup /Bf E D FZ}D +/Sc {dup -1 ne Cf and{/CL CL 1 add D dup 0 eq{pop [0 0 0]}if + dup CA E CL E put VS ( VC ) join C1 E join /C1 E D}{pop}ie} D +/Ec {WB Cf{/CL CL 1 sub NN D CA CL get VS ( VC ) join C1 E join /C1 E D}if} D +/VS {dup type /arraytype eq{([) E {ST cvs join ( ) join}forall (]) join}if} D +/VC {{255 div}forall setrgbcolor} D +/Sl {dup type /integertype ne{Ds}if /La E D WB}d +/UN {WB /UF t D} D +/NU {WB /UF f D} D +/SE {WB /sF t D} D +/XE {WB /sF f D} D +/sM {/C1 C1 ( k1 ) join D}d +/eM {/C1 C1 ( k2 ) join D}d +/k1 {/YC CP E pop Ts add D /mF t D /f1 t D}d +/k2 {gsave 3 LW -9 CP E pop Ts 0.2 mul sub M -9 YC L stroke grestore /mF f D}d +/Ac {/AC E D WB}d +/Ca {eA{( \()join AC join(\) )join}if WB}d +/s {OU{gsave 0 CS .25 mul R dup SW pop CJ 0 RL stroke grestore}if}D +/CJ {AT 3 eq LB and{E dup dup length 1 sub A1 mul E + {( ) search{pop pop E A2 add E}{pop exit}ie}loop 3 -1 roll add + W CP pop sub 2 copy gt{E}if pop}if}D +/So {/Co E D} D +/SO {C1 Yo ST cvs join ( So ) join /C1 E D (j) SW pop 2 div Pd} D +/Se {E WB CS E div Pd}D +/Pd {dup type /stringtype eq{SW pop}if dup /L1 E L1 add D + ST cvs ( 0 R ) join C1 E join /C1 E D} D +/Sp {0.35 CO} D +/Sb {-0.2 CO} D +/CO {OV Io Yo put /Yo E CS mul Yo add D /Io Io 1 add D -1.5 Io mul 3 add FZ SO + CS Yo add dup YA gt{/YA E D}{pop}ie + Yo neg dup YB gt{/YB E D}{pop}ie} D +/Es {ES /Io Io 1 sub NN D /Yo OV Io get D SO} D +/SB {/N2 0 D 0 1 NI{/N E D{IX N2 get 0 lt{/N2 N2 1 add D}{exit}ie}loop + /K WS N get FC N get mul D /NY AY N2 get D /BV NY array D + 0 1 NY 1 sub{/TM K string D currentfile TM readhexstring pop pop BV E TM put} + for BM N BV put /N2 N2 1 add D}for} D +/IC [{/MA E D /MB 0 D}{2 div /MA E D /MB MA D}{/MB E CS sub D /MA CS D} + {pop /MA YS AB mul D /MB 1 AB sub YS mul D}{pop /MA 0 D /MB 0 D}] D +/IP {BV N get /N N 1 add D} D +/II {/K E D IX K get 0 lt{/EC E D}if /TY E D + TY 4 eq{/Y E D /X E D}if TY 3 eq{/AB E D}if + /XW AX K get D /YW AY K get D /IS SG IT K get get D /XS XW IS mul D + /YS YW IS mul D YS IC TY get exec /MA MA Fl not{3 add}if D} D +/IM {II /ty TY D /xs XS D /ys YS D /ya YA D /yb YB D /ma MA D /mb MB D /k K D + /ec EC D /BP f D /CI 0 D WB TL L1 xs add dup XO add MR add W gt + {pop /ma ma Fl{3 add}if D NL /YA ma D /YB mb D /YS ys D /L1 xs D} + {/L1 E D ma YA gt{/YA ma D}if mb YB gt{/YB mb D}if}ie /TB f D + OU{CP E pop YS sub LE neg lt Fl not and PB not and{NP /YA ma D /YB mb D}if + /BP f D ty ST cvs ( ) join IX k get 0 lt{(\() join ec join (\) ) join}if + k ST cvs join ty 3 eq{AB ST cvs ( ) join E join}if + ty 4 eq{X ST cvs ( ) join Y ST cvs join ( ) join E join}if C1 E join + ( DI ) join FP 2 eq FP 1 eq AF and or{( FM ) join}if + ( Il Cp ) apa /C1 E D /EN f D}if /HM t D /T f D} D +/DI {II /Xc CP /Yc E D D /YN YW neg D /HM t D /CI 0 D /K2 IX K get D gsave + TY 4 eq{OX X IS mul add OY FY add YS sub Y IS mul sub} + {/FY YS D CP MB sub 2 copy /OY E D /OX E D}ie + translate K2 0 ge{/DP AZ K2 get D /BV BM K2 get D XS YS scale /N 0 D XW YW DP + [XW 0 0 YN 0 YW] {IP} FC K2 get 1 eq{image}{f 3 colorimage}ie} + {EX}ie grestore XS 0 R /Ms t D} D +/FM {gsave 0 Sg CP MB sub translate XS neg 0 M 0 YS RL XS 0 RL 0 YS neg RL + XS neg 0 RL stroke grestore} D +/NA {/AT E D /AL AL 1 add D AV AL AT put} D +/OA {AL 0 gt{/AL AL 1 sub D /AT AV AL get D}if} D +/D1 {/BR {CP E pop E BN Mb{CP E pop eq{0 YI R}if}{pop}ie} D + /Sn {OU{C1 E ST cvs join ( Ld ) join /C1 E D}{pop}ie} D} D +/D1 {/BR {BN} D /Sn {OU {C1 E ST cvs join ( Ld ) join /C1 E D} {pop} ie} D} D +/TC {/TF t D /ML 0 D HN{SW pop dup ML gt{/ML E D}{pop}ie}forall NP /RM RM not D + RC /OU Tc D Ep /PN 0 D Ms not TP and{Ip}if /W IW ML sub Ts sub D + /A0 0 D TH{/BR {( ) join BT} D /Sn {pop} D /Ti () D /Au () D}if} D +/TN {0 eq{E EA PF HF or not XR and{HN E get Xr}{pop}ie} + {OU{Tn 0 ge{() BN}if /Tn E D}{pop}ie WB}ie} D +/NT {OU LB not and Tn 0 ge and{PL 0 eq{Ms not{CS CF FS}if CP dup + /y E YA sub D W 9 sub CS -1.8 mul XO L1 add 2 add{y M (.) show}for + HN Tn get dup SW pop IW E sub y M show CP BB M}if /Tn -1 D}if} D +/Ld {/DN E D HN DN Pn put [/View [/XYZ -4 Fl{PS}{CP YA add US E pop}ie null] + /Dest DN ST cvs cvn /DEST pdfmark} D +/C {ND 1 eq{1 sub}if TI mul /XO E D NL Nf not{pop()}if 0 3 -1 roll 1 A} D +/OP {BP not{NP}if PN 2 mod 0 eq{NP}if}D +/Ep {Xp PN 2 mod 0 eq and{/Pn (-) D showpage /PM 1 D LA}if}D +/Dg [73 86 88 76 67 68 77] D +/Rd [0 [1 1 0][2 1 0][3 1 0][2 1 1][1 1 1][2 2 1][3 3 1][4 4 1][2 1 2]] D +/Ns {/m E D /c E 32 mul D /j m 1000 idiv D /p j 12 add string D + c 96 le m 0 gt and{c 32 le {/i 0 D /d 77 D /l 100 D /m m j 1000 mul sub D + j -1 1 {pop p i d c add put /i i 1 add D}for + 4 -2 0 {/j E D /n m l idiv D /m m n l mul sub D /d Dg j get D + n 0 gt {/x Rd n get D x 0 get -1 1 {pop p i d c add put /i i 1 add D}for + p i x 1 get sub Dg x 2 get j add get c add put}if /l l 10 idiv D + }for p 0 i GI} + {/i ST length 1 sub D m {1 sub dup 0 ge{dup 26 mod c add 1 add + ST i 3 -1 roll put 26 idiv dup 0 eq{pop exit}if}if /i i 1 sub D}loop + ST i ST length i sub GI}ie} + {m p cvs}ie} D +/US {matrix currentmatrix matrix defaultmatrix matrix invertmatrix + matrix concatmatrix transform} D +/GB {Gb{US}if}D +/Tl {/Rn E D Xc CP pop ne{ + [/Rect [Xc 1 sub Yc cS 0.25 mul sub GB CP E 1 add E cS 0.85 mul add GB] + /Subtype /Link /Border [0 0 Cf Lc and LX and AU or{0}{1}ie] Rn type + /nametype eq {/Dest Rn}{/Action [/Subtype /URI /URI Rn] Cd}ie + /ANN pdfmark}if} D +/Il {/Rn E D [/Rect [Xc Yc GB Xc XS add Yc YS add GB] /Subtype /Link + /Border [0 0 0] Rn type /nametype eq{/Dest Rn} + {/Action [/Subtype /URI /URI Rn] Cd}ie /ANN pdfmark} D +/XP {[{/Z Bz 2 div D Z 0 R Z Z RL Z neg Z RL Z neg Z neg RL Z Z neg RL} + {Bz 0 RL 0 Bz RL Bz neg 0 RL 0 Bz neg RL} + {0 -5 R Bz 0 RL 0 21 RL Bz neg 0 RL 0 -21 RL}]} D +/MS {/Sm E D WB}D +/O {BN()Sm BX} D +/BX {/Bt E D Bt 2 lt{CS 0.8 mul}{11 mul}ie W XO sub MR sub 2 copy gt{E}if pop + /HZ E D WB Bt 2 eq{HZ ST cvs ( ) join}{()}ie + Bt ST cvs join ( Bx ) join HM{( ) Pd}if + L1 HZ add XO add MR add W gt{NL}if C1 E join /C1 E D /L1 L1 HZ add D /T f D + ( ) WB Bt 2 lt{YA CS .8 mul lt{/YA CS .8 mul D}if} + {YB 5 lt{/YB 5 D}if YA 21 lt{/YA 21 D}if}ie /CI 0 D} D +/Bx {dup 2 eq{E /Bz E D}{/Bz CS .8 mul D}ie + OU {gsave 0 Sg XP E get exec stroke grestore}{pop}ie Bz 0 R /Ms t D} D +/SD {FD 4 mul Dy add DZ NF newpath 0 0 M DX t charpath pathbbox + 3 -1 roll sub /DY E D E dup /X1 E D sub WM mul WX DY mul add WM DG mul E div + /DF E D /DR WX DF mul DY mul WM div 2 div D} d +/Sd {gsave 0 IL Di mul neg translate IL IW atan Di 0 eq{neg}if rotate + FD 4 mul Dy add DZ NF DR X1 sub DY 2 div neg M cD VC DX show grestore} d +/RC {/AI 0 D /LG 0 D /BC 0 D /UI 0 D /PF f D /Cc 0 D /Dc 10 array D + /NR [0 1 9{pop 0}for] D /La Ds D /AR 10 array D /TR 10 array D /AV 30 array D + SI /AL -1 D /AT A0 D AT NA /OV 9 array D /Yo 0 D /Co 0 D /Io 0 D /Hy f D + /Ph f D /CL -1 D Ct Sc}D +/ZF {/FR [0 1 30{pop 0}for] D /SZ [0 1 30{pop 0}for] D /FO [0 1 30{pop 0}for] D + /SL 0 D /CF 0 D /FN 0 D 0 Ts SF}D +/QO [[(\253\240)(\232)(\234)(\233)(\253)(\273)][(\253\240)(\231)(')(`)(\253)(\273)]] D +/QC [[(\240\273)(\233)(\234)(\234)(\273)(\253)][(\240\273)(`)(')(')(\273)(\253)]] D +/Hf EF length 2 sub D +/Hz EZ Hf get D +/HS Ey Hf get D +/Fz EZ Hf 1 add get D +/Fs Ey Hf 1 add get D +/LE IL D +/Ps EZ 1 get D +/Fp EF 1 get D +/XO 0 D +/YI 0 D +/CI 0 D +/FP 0 D +/WW Ts 7 mul D +/Mf 0 D +/YA 0 D +/YB 0 D +/Cs Ts D +/GS Ts D +/F0 0 D +/NS 0 D +/NB 0 D +/N 0 D +/C0 [] D +/C1 () D +/Lo 0 D +/L1 0 D +/LM 0 D +/PH 0 D +/EC 0 D +/Lh 0 D +/LT 0 D +/CH 1 string D +/ST 16 string D +/CA 9 array D +/HC (\255) D +/HM f D +/PF f D +/EN f D +/TB f D +/UF f D +/sF f D +/AE f D +/AF f D +/BP t D +/CD f D +/PA t D +/GL f D +/T t D +/HF f D +/AH f D +/SA f D +/PB f D +/f1 f D +/mF f D +/OX 0 D +/OY 0 D +/FY 0 D +/EO 0 D +/FB 0 D +/PL 0 D +/Bw 0 D +/PD -1 D +/TP f D +/TH t D +/Ty 4 D +/Tn -1 D +/Fl t D +/LB t D +/PM 1 D +/Ms f D +/Ba f D +/Bb f D +/Hl 3 D +/hl 6 D +/hL 6 D +/Hs f D +/HI 0 D +/hi 0 D +/PO t D +/TE f D +/LF t D +/BO 0 D +/Sm 1 D +/Bf 3 D +/A1 0 D +/A2 0 D +/Ds 3 D +/QL -1 D +/Cb Db D +/Ct Dt D +/Cl Dl D +[/Creator (html2ps version 1.0 beta1) /Author () /Keywords () /Subject () + /Title (A Python Quick Reference) /DOCINFO pdfmark +/ND 1 D +/HN [1 1 96{pop (??)}for] D +/h1 [(1\240\240)(Python 1.52 Quick Reference)] D +/h2 [(1.1\240\240)(Contents)] D +/h3 [(1.2\240\240)(Invocation Options)] D +/h4 [(1.3\240\240)(ENVIRONMENT VARIABLES)] D +/h5 [(1.4\240\240)(Terms Used In This Document)] D +/h6 [(1.5\240\240)(Notable lexical entities)] D +/h7 [(1.5.1\240\240)(Keywords)] D +/h8 [(1.5.2\240\240)(Identifiers)] D +/h9 [(1.5.3\240\240)(Operators)] D +/h10 [(1.5.4\240\240)(Strings)] D +/h11 [(1.5.4.1\240\240)(String Literal Escapes)] D +/h12 [(1.5.5\240\240)(Numbers)] D +/h13 [(1.5.6\240\240)(Sequences)] D +/h14 [(1.5.7\240\240)(Dictionaries \201Mappings\202)] D +/h15 [(1.6\240\240)(Basic Types and Their Operations)] D +/h16 [(1.6.1\240\240)(Comparisons \201defined between *any* types\202)] D +/h17 [(1.6.2\240\240)(Boolean values and operators)] D +/h18 [(1.6.3\240\240)(None)] D +/h19 [(1.6.4\240\240)(Numeric types)] D +/h20 [(1.6.4.1\240\240)(Floats, integers and long integers.)] D +/h21 [(1.6.4.2\240\240)(Operators on all numeric types)] D +/h22 [(1.6.4.3\240\240)(Bit operators on integers and long integers)] D +/h23 [(1.6.4.4\240\240)(Complex Numbers)] D +/h24 [(1.6.4.5\240\240)(Numeric exceptions)] D +/h25 [(1.6.5\240\240)(Operations on all sequence types \201lists, tuples, strings\202)] D +/h26 [(1.6.6\240\240)(Operations on mutable \201=modifiable\202 sequences \201lists\202)] D +/h27 [(1.6.7\240\240)(Operations on mappings \201dictionaries\202)] D +/h28 [(1.6.8\240\240)(Format operator for strings \201%\202)] D +/h29 [(1.6.8.1\240\240)(Uses C printf format codes :)] D +/h30 [(1.6.9\240\240)(File Objects)] D +/h31 [(1.6.9.1\240\240)(Operators on file objects)] D +/h32 [(1.6.9.2\240\240)(File Exceptions)] D +/h33 [(1.7\240\240)(Advanced Types)] D +/h34 [(1.8\240\240)(Statements)] D +/h35 [(1.8.1\240\240)(Control Flow)] D +/h36 [(1.8.2\240\240)(Exception Statements)] D +/h37 [(1.8.3\240\240)(Name Space Statements)] D +/h38 [(1.8.4\240\240)(Function Definition)] D +/h39 [(1.8.5\240\240)(Class Definition)] D +/h40 [(1.8.5.1\240\240)(Documentation Strings)] D +/h41 [(1.8.6\240\240)(Others)] D +/h42 [(1.9\240\240)(Built-In Functions)] D +/h43 [(1.10\240\240)(Built-In Exceptions)] D +/h44 [(1.11\240\240)(Standard methods & operators redefinition in classes)] D +/h45 [(1.11.1\240\240)(Special methods for any class)] D +/h46 [(1.11.2\240\240)(Operators)] D +/h47 [(1.12\240\240)(Special informative state attributes for some types:)] D +/h48 [(1.13\240\240)(Important Modules)] D +/h49 [(1.14\240\240)(List of modules in base distribution)] D +/h50 [(1.14.1\240\240)(Contents of Lib directory \201Python 1.52 NT distribution, may be slightly different in other distributions\202)] D +/h51 [(1.14.2\240\240)()] D +/h52 [(1.14.3\240\240)(\201following list not revised\202 * Built-ins *)] D +/h53 [(1.14.4\240\240)(* Standard *)] D +/h54 [(1.14.5\240\240)(* Unix/Posix *)] D +/h55 [(1.14.6\240\240)(* Tk User-interface Toolkit *)] D +/h56 [(1.14.7\240\240)(* Multimedia *)] D +/h57 [(1.14.8\240\240)(* Cryptographic Extensions *)] D +/h58 [(1.14.9\240\240)(* Stdwin * Standard Window System)] D +/h59 [(1.14.10\240\240)(* SGI IRIX * \2014 & 5\202)] D +/h60 [(1.14.11\240\240)(* Suns *)] D +/h61 [(1.15\240\240)(Workspace exploration and idiom hints)] D +/h62 [(1.16\240\240)(Python Mode for Emacs)] D +/h63 [(1.17\240\240)(The Python Debugger)] D +/h64 [(1.17.1\240\240)(Accessing)] D +/h65 [(1.17.2\240\240)(Commands)] D +/h66 [(1.17.3\240\240)(Example)] D +/h67 [(1.17.4\240\240)(Quirks)] D +/Hr [29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 +51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 +75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95]D +/HV [1 2 2 2 2 2 3 3 3 3 4 3 3 3 2 3 3 3 3 4 4 4 4 4 3 3 3 3 4 3 4 4 2 +2 3 3 3 3 3 4 3 2 2 2 3 3 2 2 2 3 3 3 3 3 3 3 3 3 3 3 2 2 2 3 3 3 3]D +/Cn [17 0 0 0 0 7 0 0 0 1 0 0 0 0 9 0 0 0 5 0 0 0 0 0 0 0 0 1 0 2 0 0 0 +6 0 0 0 0 1 0 0 0 0 2 0 0 0 0 11 0 0 0 0 0 0 0 0 0 0 0 0 0 4 0 0 0 0]D +Hr length 0 gt{[/PageMode /UseOutlines /DOCVIEW pdfmark}if +/Hn 1 D +0 1 Hr length 1 sub{ + /Bn E D [Cn Bn get dup 0 gt{/Count E HV Bn get Bl ge{neg}if}{pop}ie + /Dest Hr Bn get dup abs ST cvs cvn E 0 ge{(h)Hn ST cvs join cvx exec dup 1 get + E Nf{0 get E join}{pop}ie /Hn Hn 1 add D}{()}ie /Title E /OUT pdfmark}for +ZF /FN Fp D Ps 0 FS /WC Wf{( )}{<A1A1>}ie SW pop D +ET RC ZF +/Df f D +/R1 (http://www.python.org/) D +/TS { + tables E get /table E D + table aload pop /rdesc E D /cdesc E D /tdesc E D + tdesc aload pop /capalg E D /caption E D /rules E D /frame E D /nfoot E D + /nhead E D /ncol E D /nrow E D /border E D /twid E D /units E D /talign E D + /flow E D /clear E D /tclass E D pop pop + /w W D /eps 0.1 D /OU f D /PL 1 D + /FN EF 21 get D EZ 21 get Ey 21 get FS + 0 1 1{ + /pass E D + 0 1 nrow{ + /irow E D + /cells rdesc irow get 6 get D + 0 1 ncol{ + /icol E D + /cell cells icol get D + cell 0 ne{ + cell aload pop /CB E D pop pop pop + /DV E D /bot E D /top E D /right E D /left E D /nowrap E D /valign E D + /dp E D /align E D /rspan E D /cspan E D /cclass E D /ctype E D /cmax E D + /cmin E D /proc E D + rspan 0 eq{/rspan nrow irow sub 1 add D}if + cspan 0 eq{/cspan ncol icol sub 1 add D}if + pass 0 eq cspan 1 eq and pass 1 eq cspan 1 gt and or{ + /W 1e5 D /LL W D /PH 1 D + ctype 1 eq{() BD}if + RC align NA + AT 4 eq{/CD t D /DC dp D /LN 0 D /M1 0 D /M2 0 D}{/CD f D}ie + 0 0 M /LM 0 D proc exec BN + AT 4 eq{ + LN array astore cell 15 3 -1 roll put + cdesc icol get dup dup 5 get M1 lt{5 M1 put}{5 get /M1 E D}ie + dup 6 get M2 lt{6 M2 put}{6 get /M2 E D}ie + /LM M1 M2 add D + }if + /CD f D + /thiswid LM left add right add eps add D + /oldmin 0 D /oldmax 0 D + 0 1 cspan 1 sub{ + icol add cdesc E get dup 2 get /oldmax E oldmax add D + 1 get /oldmin E oldmin add D + }for + thiswid oldmax ge{ + 0 1 cspan 1 sub{ + icol add cdesc E get dup 2 E 2 get oldmax 0 eq + {pop thiswid cspan div}{thiswid mul oldmax div}ie + put + }for + }if + nowrap 1 eq{ + thiswid oldmin ge{ + 0 1 cspan 1 sub{ + icol add cdesc E get dup 1 E 1 get oldmin 0 eq + {pop thiswid cspan div}{thiswid mul oldmin div}ie + put + }for + }if + }{ + /W 0 D /LL W D /PH 2 D + ctype 1 eq{() ES () BD}if + 0 0 M /LM 0 D RC proc exec BN + /thiswid LM left add right add eps add D + thiswid oldmin ge{ + 0 1 cspan 1 sub{ + icol add cdesc E get dup 1 E 1 get oldmin 0 eq + {pop thiswid cspan div}{thiswid mul oldmin div}ie + put + }for + }if + }ie + ctype 1 eq{() ES}if + }if + }if + }for + }for + }for + /tmin 0 D /tmax 0 D + 0 1 ncol{ + cdesc E get dup 1 get E 2 get 2 copy gt{pop dup}if + tmax add /tmax E D tmin add /tmin E D + }for + twid 0 lt{twid neg IW gt{IW neg}{twid}ie /twid E D}if + tdesc 0 twid neg tmin 2 copy lt{E}if pop put + tdesc 1 twid neg tmax 2 copy lt{E}if pop put + /W w D /LL W D /OU t D /PH 0 D /PL 0 D +} D +/PT { + /PL PL 1 add D + tables E get /table E D Tm 21 get Ts mul BE + PL 2 ge{save}if + /SL SL 1 add D /FN EF 21 get D EZ 21 get Ey 21 get FS + table aload pop /rdesc E D /cdesc E D /tdesc E D + tdesc aload pop /capalg E D /caption E D /rules E D /frame E D /nfoot E D + /nhead E D /ncol E D /nrow E D /border E D /twid E D /units E D /talign E D + /flow E D /clear E D /tclass E D /tmax E D /tmin E D + /w W D /xo XO D /mr MR D /ll LL D /lg LG D /ai AI D /bc BC D /nr NR D /ar AR D + /tr TR D /ui UI D /ph PH D /a0 A0 D /pf PF D /at AT D /av AV D /al AL D + /Le LE D /la La D + talign 0 lt{/talign AL 0 gt{AV AL get}{A0 2 le{A0}{0}ie}ie D}if + ph 1 eq ph 2 eq or{ + NL ph 1 eq{tmax}{tmin}ie dup XO add LM gt{/LM E XO add D}{pop}ie LM E + }{ + /PH 3 D /LE 1e5 D RC %ZF + border 0 gt{/border 1 D}if + /twidth 0 D /avail W xo sub D + twid 0 eq{0 1 ncol{cdesc E get dup 2 get E 3 get dup 0 gt{div neg dup twid lt + {/twid E D}{pop}ie}{pop pop}ie}for}if + /twid twid dup 0 lt{neg avail 2 copy gt{E}if pop}{avail mul}ie D + /OK t D 0 1 ncol{cdesc E get dup 1 get E 3 get twid mul gt{/OK f D}if}for + 0 1 ncol{ + cdesc E get dup 1 get /colmin E D dup 3 get /cwid E twid mul D dup + tmax avail le{2 get}if + tmin avail le tmax avail gt and{ + dup 2 get E 1 get dup 3 1 roll sub avail tmin sub mul tmax tmin sub div add + }if + tmin avail gt{1 get}if + 0 E colmin cwid lt OK and{pop cwid}if dup /twidth E twidth add D put + }for + /OU f D CP + tmin twid le{ + 0 1 ncol{cdesc E get dup 0 get twidth div twid mul 0 E put}for + /twidth twid D + }if + CP printcap CP E pop sub /caphig E D pop + 0 1 1{ + /pass E D + 0 1 nrow{ + /irow E D + /cells rdesc irow get 6 get D + 0 1 ncol{ + /icol E D + /cell cells icol get D + cell 0 ne{ + cell aload pop /CB E D pop pop pop + /DV E D /bot E D /top E D /right E D /left E D /nowrap E D /valign E D + /dp E D /align E D /rspan E D /cspan E D /cclass E D /ctype E D /cmax E D + /cmin E D /proc E D + rspan 0 eq{/rspan nrow irow sub 1 add D}if + cspan 0 eq{/cspan ncol icol sub 1 add D}if + /W 0 D + 0 1 cspan 1 sub{icol add cdesc E get 0 get /W E W add D}for + pass 0 eq rspan 1 eq and pass 1 eq rspan 1 gt and or{ + ctype 1 eq{() BD}if + /W W left sub right sub D /XO 0 D /EO 0 D SI + /A0 align D RC align NA + AT 4 eq{ + /DC dp D /DO 0 D /ID 1 D + 0 1 DV length 1 sub{DV E get dup DO gt{/DO E D}{pop}ie}for + /Lo DO DV 0 get sub D /L1 Lo D + }if + 0 0 M /BP t D /Fl t D /MF 0 D /FB 0 D + proc exec T not{/CI 0 D}if BN 0 FB neg R MF 0 eq{/MF CS D}if + CP /thishig E neg bot add top add CI add D pop + cell 16 MF put cell 17 Ya put cell 18 thishig put + valign 4 eq{ + /below thishig Ya sub D + rdesc irow get dup dup 4 get Ya lt + {4 Ya put}{4 get /Ya E D}ie + dup 5 get below lt{5 below put}{5 get /below E D}ie + /thishig Ya below add D + }if + ctype 1 eq{()ES}if + /oldhig 0 D + 0 1 rspan 1 sub{ + irow add rdesc E get 0 get /oldhig E oldhig add D + }for + thishig oldhig ge{ + 0 1 rspan 1 sub{ + irow add rdesc E get dup 0 E 0 get oldhig 0 eq + {pop thishig rspan div}{thishig mul oldhig div}ie + put + }for + }if + }if + }if + }for + }for + }for M RC %ZF + /thight 0 D /racc 0 D /maxh 0 D /brk 0 D /rbeg nhead nfoot add D + rbeg 1 nrow{ + rdesc E get dup 0 get dup /thight E thight add D + brk 0 eq{/racc E D}{/racc E racc add D}ie + racc maxh gt{/maxh racc D}if 2 get /brk E D + }for + ph 3 ge{thight caphig add E}if + ph 0 eq ph 4 eq or{ + /PH 4 D /LE Le D /OU Ou D /yoff 0 D /headsz 0 D + 0 1 nhead 1 sub{rdesc E get 0 get headsz add /headsz E D}for + /footsz 0 D + 0 1 nfoot 1 sub{rdesc E nhead add get 0 get footsz add /footsz E D}for + /ahig LE BO add MI add D /maxh maxh headsz add footsz add D + /thight thight headsz add footsz add D + tmin avail gt maxh ahig gt or + {/Sf avail tmin div dup ahig maxh div gt{pop ahig maxh div}if D /SA t D} + {/Sf 1 D}ie + tclass 1 eq thight LE 15 sub gt and + {/SA t D LE 15 sub thight div dup Sf lt{/Sf E D}{pop}ie}if + SA{Sf Sf scale /ll ll Sf div D /xo xo Sf div D /LE LE Sf div D + /mr mr Sf div D /BO BO Sf div D /ahig ahig Sf div D}if + nhead nfoot add getwid + LE CP E pop add capalg 0 eq{caphig sub}if dup headsz sub footsz sub rwid lt + E thight lt thight ahig lt and or{NP}if + capalg 0 eq{printcap -8 SP}if + CP /ycur E D pop + printhead + rbeg 1 nrow{/row E D row + getwid + ycur yoff add rwid sub footsz sub LE add 0 lt + {nfoot 0 gt{printfoot}if Tf NP /rbeg irow1 D + Ba{MI /MI MI SA{Sf div}if D MI SP /MI E D}if + CP /ycur E D pop /yoff 0 D printhead}if + irow1 printrow + }for + printfoot /row row 1 add D Tf + 0 ycur yoff add M + capalg 1 eq{/EO 0 D SI -3 SP printcap}if + Sf 1 lt{1 Sf div dup scale /ll ll Sf mul D /xo xo Sf mul D /LE LE Sf mul D + /mr mr Sf mul D /BO BO Sf mul D /SA f D}if + /EO 0 D + }if + }ie + /W w D /XO xo D /MR mr D /LL ll D /LG lg D /AI ai D /BC bc D /NR nr D /AR ar D + /TR tr D /UI ui D /PH ph D /A0 a0 D /PF pf D /AT at D /AV av D /AL al D + /La la D + /SL SL 1 sub NN D /CF 0 D /FN 0 D SZ SL get FR SL get FS Wf not{()F2}if + PL 2 ge{Ms E restore Ms or /Ms E D PH 1 eq PH 2 eq or + {/LM E D}if PH 3 ge{/CI 0 D NL 0 E neg R}if + }if + /PL PL 1 sub D /CI 0 D /BP f D /PO f D () Bm 21 get Ts mul BE BL %CF CS SF +} D +/printcap{ + capalg 0 ge{ + SA{/W w Sf div D} + {talign 1 eq{/XO xo ll twidth sub 2 div add D}if + talign 2 eq{/XO xo ll twidth sub add D}if + /W XO twidth add D + }ie /XO xo D /LL W XO sub MR sub D + /PA f D /Fl capalg 0 eq D + 1 NA BL caption exec BN OA /PA t D + }if +} D +/getwid{ + /irow1 E D + /irow2 irow1 D + /rwid 0 D + {rdesc irow2 get dup 0 get rwid add /rwid E D 2 get 0 eq + {exit}{/irow2 irow2 1 add D}ie + }loop +} D +/printrow{ + /xoff ll twidth PL 2 ge{Sf div}if sub talign mul 2 div D + /xleft xoff xo add D + /irow E D + /cells rdesc irow get 6 get D + 0 1 ncol{ + /icol E D + /cell cells icol get D + cell 0 ne{ + cell aload pop /CB E D /cvsize E D /above E D /fontsz E D + /DV E D /bot E D /top E D /right E D /left E D /nowrap E D /valign E D + /dp E D /align E D /rspan E D /cspan E D /cclass E D /ctype E D /cmax E D + /cmin E D /proc E D + rspan 0 eq{/rspan nrow irow sub 1 add D}if + cspan 0 eq{/cspan ncol icol sub 1 add D}if + /width 0 D + 0 1 cspan 1 sub{icol add cdesc E get 0 get /width E width add D}for + /rhight rdesc irow get 0 get D + /hight rhight D + 1 1 rspan 1 sub{irow add rdesc E get 0 get /hight E hight add D}for + /W xo xoff add width add right sub D + /EO xo xoff add left add D SI + Cf{ + gsave CB VC xo xoff add ycur yoff add M + 0 hight neg RL width 0 RL 0 hight RL width neg 0 RL fill + grestore + }if + ctype 1 eq{() BD}if + /A0 align D RC + AT 4 eq{ + /DC dp D /ID 1 D /DO cdesc icol get 5 get D /Lo DO DV 0 get sub D /L1 Lo D + }if + valign 3 le{0 ycur yoff add top sub + hight cvsize sub valign 1 sub mul 2 div sub M} + {0 ycur yoff add top sub above add rdesc irow get 4 get sub M}ie + /PA f D /BP t D /Fl t D + BL proc exec BN + /PA t D + ctype 1 eq{() ES}if + }if + /xoff xoff cdesc icol get 0 get add D + }for + /yoff yoff rhight sub D +} D +/printhead {0 1 nhead 1 sub{printrow}for} D +/printfoot {nhead 1 nhead nfoot add 1 sub{printrow}for} D +/Tf { + OU{rules 2 ge{/yoff 0 D + gsave 0 Sg + [0 1 nhead 1 sub{}for rbeg 1 row 1 sub{}for nhead 1 nhead nfoot add 1 sub{}for]{ + /irow E D + /xoff ll twidth PL 2 ge{Sf div}if sub talign mul 2 div D + /cells rdesc irow get 6 get D + 0 1 ncol{ + /icol E D + /cell cells icol get D + cell 0 ne{ + /rspan cell 6 get D + /cspan cell 5 get D + rspan 0 eq{/rspan nrow irow sub 1 add D}if + cspan 0 eq{/cspan ncol icol sub 1 add D}if + /width 0 D + 0 1 cspan 1 sub{icol add cdesc E get 0 get /width E width add D}for + /rhight rdesc irow get 0 get D + /hight rhight D + 1 1 rspan 1 sub{irow add rdesc E get 0 get /hight E hight add D}for + xo xoff add width add ycur yoff add M + 0 hight neg icol cspan add 1 sub ncol lt + {cdesc icol 1 add get 4 get dup rules 3 le{1 eq}{pop t}ie + {1 eq{0.8}{0.3}ie + LW RL CP stroke M}{pop R}ie}{R}ie + irow nhead nfoot add 1 sub ne nfoot 0 eq or + {irow rspan add 1 sub nrow lt + {rdesc irow rspan add get 3 get}{nfoot 0 eq{0}{1}ie}ie + dup rules 2 mod 0 eq{1 eq}{pop t}ie + {1 eq irow rspan add nhead eq or irow rspan add row eq nfoot 0 gt and or + {0.8}{0.3}ie LW width neg 0 RL CP stroke M}{pop}ie}if + }if + /xoff xoff cdesc icol get 0 get add D + }for + /yoff yoff rhight sub D + }forall + grestore + /Ms t D + }if + frame 1 gt{ + gsave + 1 LW 0 Sg + xleft ycur M CP BB + 0 yoff frame 5 eq frame 7 ge or{RL}{R}ie + twidth 0 frame 3 eq frame 4 eq or frame 8 ge or{RL}{R}ie CP BB + 0 yoff neg frame 6 ge{RL}{R}ie + twidth neg 0 frame 2 eq frame 4 eq or frame 8 ge or{RL}{R}ie + closepath stroke + grestore + /Ms t D + }if + }if +} D +/tables [[[0 0 0 0 0 -1 0 0.6 1 9 2 0 0 9 5 {()} -1] + [[0 0 0 0 0 0 0][0 0 0 0 0 0 0][0 0 0 0 0 0 0]] + [[0 0 0 0 0 0 [[{()3 Sl()WB()BD(Operation)ES()} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#CC 16#99] ] +[{()3 Sl()WB()2 Al()BD(Result)ES()Ea()} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#CC 16#99] ] +[{()3 Sl()WB()BD(Notes)ES()} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#CC 16#99] ] +]] +[0 0 0 0 0 0 [[{()3 Sl()WB()3 FZ()I(x)ES( )BD(in)ES( )I(s)ES()Ef()} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#FF 16#CC] ] +[{()3 Sl()WB(1 if an item of )I(s)ES( is equal to )I(x)ES(, else 0)} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#FF 16#CC] ] +[{()3 Sl()WB()} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#FF 16#CC] ] +]] +[0 0 0 0 0 0 [[{()3 Sl()WB()3 FZ()I(x)ES( )BD(not in)ES( )I(s)ES()Ef()} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#FF 16#CC] ] +[{()3 Sl()WB(0 if an item of )I(s)ES( is equal to )I(x)ES(, else 1)} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#FF 16#CC] ] +[{()3 Sl()WB()2 Al(\240)Ea()} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#FF 16#CC] ] +]] +[0 0 0 0 0 0 [[{()3 Sl()WB()3 FZ()I(s)ES( )BD(+)ES( )I(t)ES()Ef()} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#FF 16#CC] ] +[{()3 Sl()WB(the concatenation of )I(s)ES( and )I(t)ES()} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#FF 16#CC] ] +[{()3 Sl()WB()} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#FF 16#CC] ] +]] +[0 0 0 0 0 0 [[{()3 Sl()WB()3 FZ()I(s )ES()BD(*)ES( )I(n)ES(, )I(n)ES()BD(*)ES()I(s)ES()Ef()} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#FF 16#CC] ] +[{()3 Sl()WB()I(n)ES( copies of )I(s)ES( concatenated)} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#FF 16#CC] ] +[{()3 Sl()WB()2 Al(\240)Ea()} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#FF 16#CC] ] +]] +[0 0 0 0 0 0 [[{()3 Sl()WB()3 FZ()I(s)ES()BD([)ES()I(i)ES()BD(])ES()Ef()} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#FF 16#CC] ] +[{()3 Sl()WB()I(i)ES('th item of )I(s)ES(, origin 0)} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#FF 16#CC] ] +[{()3 Sl()WB()2 Al(\2011\202)Ea()} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#FF 16#CC] ] +]] +[0 0 0 0 0 0 [[{()3 Sl()WB()3 FZ()I(s)ES()BD([)ES()I(i)ES()BD(:)ES()I(j)ES()BD(])ES()Ef()} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#FF 16#CC] ] +[{()3 Sl()WB(slice of )I(s)ES( from )I(i)ES( \201included\202 to )I(j)ES( \201excluded\202)} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#FF 16#CC] ] +[{()3 Sl()WB()2 Al(\2011\202, \2012\202)Ea()} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#FF 16#CC] ] +]] +[0 0 0 0 0 0 [[{()3 Sl()WB()3 FZ()BD(len)ES(\201)I(s)ES(\202)Ef()} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#FF 16#CC] ] +[{()3 Sl()WB(length of )I(s)ES()} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#FF 16#CC] ] +[{()3 Sl()WB()} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#FF 16#CC] ] +]] +[0 0 0 0 0 0 [[{()3 Sl()WB()3 FZ()BD(min)ES(\201)I(s)ES(\202)Ef()} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#FF 16#CC] ] +[{()3 Sl()WB(smallest item of )I(s)ES()} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#FF 16#CC] ] +[{()3 Sl()WB()2 Al(\240)Ea()} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#FF 16#CC] ] +]] +[0 0 0 0 0 0 [[{()3 Sl()WB()3 FZ()BD(max)ES(\201)I(s)ES(\202)Ef()} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#FF 16#CC] ] +[{()3 Sl()WB(largest item of )I(\201s)ES(\202)} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#FF 16#CC] ] +[{()3 Sl()WB()2 Al(\240)Ea()} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#FF 16#CC] ] +]] +]] +[[0 0 0 0 0 -1 0 0.7 1 12 2 0 0 9 5 {()} -1] + [[0 0 0 0 0 0 0][0 0 0 0 0 0 0][0 0 0 0 0 0 0]] + [[0 0 0 0 0 0 [[{()3 Sl()WB()BD(Operation)ES()} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#CC 16#99] ] +[{()3 Sl()WB()2 Al()BD(Result)ES()Ea()} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#CC 16#99] ] +[{()3 Sl()WB()BD(Notes)ES()} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#CC 16#99] ] +]] +[0 0 0 0 0 0 [[{()3 Sl()WB()3 FZ()I(s)ES()BD([)ES()I(i)ES()BD(])ES( )BD(=)ES()I(x)ES()Ef()} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#FF 16#CC] ] +[{()3 Sl()WB(item )I(i)ES( of )I(s)ES( is replaced by )I(x)ES()} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#FF 16#CC] ] +[{()3 Sl()WB()} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#FF 16#CC] ] +]] +[0 0 0 0 0 0 [[{()3 Sl()WB()I(s)ES([)I(i)ES(:)I(j)ES(] )BD(=)ES( )I(t)ES()} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#FF 16#CC] ] +[{()3 Sl()WB(slice of )I(s)ES( from )I(i)ES( to )I(j)ES( is replaced by )I(t)ES()} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#FF 16#CC] ] +[{()3 Sl()WB()2 Al(\240)Ea()} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#FF 16#CC] ] +]] +[0 0 0 0 0 0 [[{()3 Sl()WB()3 FZ()BD(del)ES( )I(s)ES([)I(i)ES(:)I(j)ES(])Ef()} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#FF 16#CC] ] +[{()3 Sl()WB(same as )3 FZ()I(s)ES([)I(i)ES(:)I(j)ES(] += [])Ef()} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#FF 16#CC] ] +[{()3 Sl()WB()} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#FF 16#CC] ] +]] +[0 0 0 0 0 0 [[{()3 Sl()WB()3 FZ()I(s)ES(.)BD(append)ES(\201)I(x)ES(\202)Ef()} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#FF 16#CC] ] +[{()3 Sl()WB(same as )3 FZ()I(s)ES([len\201)I(s)ES(\202 : len\201)I(s)ES(\202] += [)I(x)ES(])Ef()} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#FF 16#CC] ] +[{()3 Sl()WB()2 Al(\240)Ea()} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#FF 16#CC] ] +]] +[0 0 0 0 0 0 [[{()3 Sl()WB()3 FZ()I(s)ES(.)BD(extend)ES(\201)I(x)ES(\202)Ef()} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#FF 16#CC] ] +[{()3 Sl()WB(same as )3 FZ()I(s)ES([len\201)I(s)ES(\202:len\201)I(s)ES(\202]= +)I(x)ES()Ef()} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#FF 16#CC] ] +[{()3 Sl()WB(\240\240 \2015\202)} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#FF 16#CC] ] +]] +[0 0 0 0 0 0 [[{()3 Sl()WB()3 FZ()I(s)ES(.)BD(count)ES(\201)I(x)ES(\202)Ef()} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#FF 16#CC] ] +[{()3 Sl()WB(return number of )I(i)ES('s for which )3 FZ()I(s)ES([)I(i)ES(] +== )I(x)ES()Ef()} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#FF 16#CC] ] +[{()3 Sl()WB()} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#FF 16#CC] ] +]] +[0 0 0 0 0 0 [[{()3 Sl()WB()3 FZ()I(s)ES(.)BD(index)ES(\201)I(x)ES(\202)Ef()} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#FF 16#CC] ] +[{()3 Sl()WB(return smallest )I(i)ES( such that )3 FZ()I(s)ES([)I(i)ES(] +== )I(x)ES()Ef()} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#FF 16#CC] ] +[{()3 Sl()WB()2 Al(\2011\202)Ea()} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#FF 16#CC] ] +]] +[0 0 0 0 0 0 [[{()3 Sl()WB()3 FZ()I(s)ES(.)BD(insert)ES(\201)I(i)ES(, )I(x)ES(\202)Ef()} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#FF 16#CC] ] +[{()3 Sl()WB(same as )3 FZ()I(s)ES([)I(i)ES(:)I(i)ES(] += [)I(x)ES(])Ef( if )I(i)ES( >= 0)} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#FF 16#CC] ] +[{()3 Sl()WB()} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#FF 16#CC] ] +]] +[0 0 0 0 0 0 [[{()3 Sl()WB()3 FZ()I(s)ES(.)BD(remove)ES(\201)I(x)ES(\202)Ef()} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#FF 16#CC] ] +[{()3 Sl()WB(same as )3 FZ(del )I(s)ES([)I(s)ES(.index\201)I(x)ES(\202])Ef()} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#FF 16#CC] ] +[{()3 Sl()WB()2 Al(\2011\202)Ea()} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#FF 16#CC] ] +]] +[0 0 0 0 0 0 [[{()3 Sl()WB()3 FZ()I(s)ES(.)BD(pop)ES(\201)BD([)ES()I(i)ES()BD(])ES(\202)Ef()} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#FF 16#CC] ] +[{()3 Sl()WB(same as x = s[i]; del s[i]; return x)} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#FF 16#CC] ] +[{()3 Sl()WB(\240\240 \2014\202)} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#FF 16#CC] ] +]] +[0 0 0 0 0 0 [[{()3 Sl()WB()3 FZ()I(s)ES(.)BD(reverse)ES(\201\202)Ef()} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#FF 16#CC] ] +[{()3 Sl()WB(reverse the items of )I(s)ES( in place)} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#FF 16#CC] ] +[{()3 Sl()WB()2 Al(\2013\202)Ea()} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#FF 16#CC] ] +]] +[0 0 0 0 0 0 [[{()3 Sl()WB()3 FZ()I(s)ES(.)BD(sort)ES(\201)BD([)ES()I(cmpFct)ES()BD(])ES(\202)Ef()} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#FF 16#CC] ] +[{()3 Sl()WB(sort the items of )I(s)ES( in place)} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#FF 16#CC] ] +[{()3 Sl()WB()2 Al(\2012\202, \2013\202)Ea()} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#FF 16#CC] ] +]] +]] +[[0 0 0 0 0 -1 0 0.7 1 12 2 0 0 9 5 {()} -1] + [[0 0 0 0 0 0 0][0 0 0 0 0 0 0][0 0 0 0 0 0 0]] + [[0 0 0 0 0 0 [[{()3 Sl()WB()BD(Operation)ES()} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#CC 16#99] ] +[{()3 Sl()WB()2 Al()BD(Result)ES()Ea()} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#CC 16#99] ] +[{()3 Sl()WB()BD(Notes)ES()} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#CC 16#99] ] +]] +[0 0 0 0 0 0 [[{()3 Sl()WB()3 FZ()BD(len)ES(\201)I(d)ES(\202)Ef()} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#FF 16#CC] ] +[{()3 Sl()WB(the number of items in )I(d)ES()} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#FF 16#CC] ] +[{()3 Sl()WB()} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#FF 16#CC] ] +]] +[0 0 0 0 0 0 [[{()3 Sl()WB()3 FZ()I(d)ES()BD([)ES()I(k)ES()BD(])ES()Ef()} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#FF 16#CC] ] +[{()3 Sl()WB(the item of )I(d)ES( with key )I(k)ES()} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#FF 16#CC] ] +[{()3 Sl()WB()2 Al(\2011\202)Ea()} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#FF 16#CC] ] +]] +[0 0 0 0 0 0 [[{()3 Sl()WB()3 FZ()I(d)ES([)I(k)ES(] )BD(=)ES( x)Ef()} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#FF 16#CC] ] +[{()3 Sl()WB(set )I(d)ES([)I(k)ES(] to )I(x)ES()} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#FF 16#CC] ] +[{()3 Sl()WB()} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#FF 16#CC] ] +]] +[0 0 0 0 0 0 [[{()3 Sl()WB()3 FZ()BD(del)ES( )I(d)ES([)I(k)ES(])Ef()} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#FF 16#CC] ] +[{()3 Sl()WB(remove )I(d)ES([)I(k)ES(] from )I(d)ES()} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#FF 16#CC] ] +[{()3 Sl()WB()2 Al(\2011\202)Ea()} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#FF 16#CC] ] +]] +[0 0 0 0 0 0 [[{()3 Sl()WB()3 FZ()I(d)ES(.)BD(clear)ES(\201\202)Ef()} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#FF 16#CC] ] +[{()3 Sl()WB(remove all items from )I(d)ES()} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#FF 16#CC] ] +[{()3 Sl()WB()} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#FF 16#CC] ] +]] +[0 0 0 0 0 0 [[{()3 Sl()WB()3 FZ()I(d)ES(.)BD(copy)ES(\201\202)Ef()} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#FF 16#CC] ] +[{()3 Sl()WB(a shallow copy of )I(d)ES()} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#FF 16#CC] ] +[{()3 Sl()WB()} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#FF 16#CC] ] +]] +[0 0 0 0 0 0 [[{()3 Sl()WB()3 FZ()I(d)ES(.)BD(has_key)ES(\201)I(k)ES(\202)Ef()} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#FF 16#CC] ] +[{()3 Sl()WB(1 if )I(d)ES( has key )I(k)ES(, else 0)} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#FF 16#CC] ] +[{()3 Sl()WB()} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#FF 16#CC] ] +]] +[0 0 0 0 0 0 [[{()3 Sl()WB()3 FZ()I(d)ES(.)BD(items)ES(\201\202)Ef()} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#FF 16#CC] ] +[{()3 Sl()WB(a copy of )I(d)ES('s list of \201key, item\202 pairs)} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#FF 16#CC] ] +[{()3 Sl()WB()2 Al(\2012\202)Ea()} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#FF 16#CC] ] +]] +[0 0 0 0 0 0 [[{()3 Sl()WB()3 FZ()I(d)ES(.)BD(keys)ES(\201\202)Ef()} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#FF 16#CC] ] +[{()3 Sl()WB(a copy of )I(d)ES('s list of keys)} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#FF 16#CC] ] +[{()3 Sl()WB()2 Al(\2012\202)Ea()} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#FF 16#CC] ] +]] +[0 0 0 0 0 0 [[{()3 Sl()WB()3 FZ()I(d1)ES(.)BD(update)ES(\201)I(d2)ES(\202)Ef()} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#FF 16#CC] ] +[{()3 Sl()WB()3 FZ(for k, v in d2.items\201\202: d1[k] = v)Ef()} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#FF 16#CC] ] +[{()3 Sl()WB()2 Al(\2013\202)Ea()} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#FF 16#CC] ] +]] +[0 0 0 0 0 0 [[{()3 Sl()WB()3 FZ()I(d)ES(.)BD(values)ES(\201\202)Ef()} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#FF 16#CC] ] +[{()3 Sl()WB(a copy of )I(d)ES('s list of values)} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#FF 16#CC] ] +[{()3 Sl()WB()2 Al(\2012\202)Ea()} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#FF 16#CC] ] +]] +[0 0 0 0 0 0 [[{()3 Sl()WB()3 FZ()I(d)ES(.)BD(get)ES(\201)I(k)ES(,)I(defaultval)ES(\202)Ef()} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#FF 16#CC] ] +[{()3 Sl()WB(the item of )I(d)ES( with key )I(k)ES()} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#FF 16#CC] ] +[{()3 Sl()WB()2 Al(\2014\202)Ea()} 0 0 0 0 1 1 0 (.) 2 0 3 3 3 3 0 0 0 0 [16#FF 16#FF 16#CC] ] +]] +]] +] D +0 1 2{TS}for RC ZF + +/Cb Db D /Ct [16#00 16#00 16#00] D /Cl [16#00 16#00 16#00] D /CL -1 D Ct Sc + +/Ba f D /BO 0 D Bs +/UR (quick-ref1_52.html) D +/Ti (A Python Quick Reference) D +/Au () D +/Df f D + + +NP RC ZF +()3 Sl()WB 0 Sn( + +)2 Al( +)0 1 0 H(Python)WB 29 Sn( 1.52 Quick Reference)EH()Ea( + +)2 1 1 HR()BR()-1 Bf add FZ(\240)I(1999/06/04, upgraded by Richard Gruet, )0 2 A(rgruet@ina.fr)EA( +from V1.3 ref: 1995/10/30, by Chris Hoffmann, )0 2 A(choffman@vicorp.com)EA()ES()Ef( +)0 P()-1 Bf add FZ(Based on:)Ef( +)BR()-1 Bf add FZ(\240\240\240 Python Bestiary, Author: Ken Manheimer, +ken.manheimer@nist.gov)Ef( +)BR()-1 Bf add FZ(\240\240\240 Python manuals, Author: Guido van +Rossum, )0 2 A(guido@CNRI.Reston.Va.US)EA(, +)0 2 A(guido@python.org)EA()Ef( +)BR()-1 Bf add FZ(\240\240\240 python-mode.el, Author: Tim Peters, +)0 2 A(tim_one@email.msn.com)EA()Ef( +)BR()-1 Bf add FZ(\240\240\240 and the readers of )0 2 A(comp.lang.python)EA()Ef( +)0 P()-1 Bf add FZ(Python site: )R1 2 A(http://www.python.org)EA()Ef( +)BR()2 1 1 HR()0 2 1 H(Contents)WB 30 Sn()EH( + +)UL()-1 LI()0 1 1 A(Invocation Options)1 0 TN TL()Ec /AF f D( + +)-1 LI()0 2 1 A(Environment Variables)2 0 TN TL()Ec /AF f D( + +)-1 LI()0 3 1 A(Terms Used In This Document)3 0 TN TL()Ec /AF f D( + +)-1 LI()0 4 1 A(Lexical Entities)4 0 TN TL()Ec /AF f D( + +)-1 LI()0 5 1 A(Basic Types And Their Operations)5 0 TN TL()Ec /AF f D( + +)-1 LI()0 6 1 A(Advanced Types)6 0 TN TL()Ec /AF f D( + +)-1 LI()0 7 1 A(Statements)7 0 TN TL()Ec /AF f D( + +)-1 LI()0 8 1 A(Built In Functions)8 0 TN TL()Ec /AF f D( + +)-1 LI()0 9 1 A(Built In Exceptions)9 0 TN TL()Ec /AF f D( + +)-1 LI()0 10 1 A(Standard methods & operators redefinition +in user-created Classes)10 0 TN TL()Ec /AF f D( + +)-1 LI()0 11 1 A(Special informative state attributes for some +types)11 0 TN TL()Ec /AF f D( + +)-1 LI()0 12 1 A(Important Modules)12 0 TN TL()Ec /AF f D( : )0 13 1 A(sys)13 0 TN TL()Ec /AF f D(, +)0 14 1 A(os)14 0 TN TL()Ec /AF f D(, +)0 15 1 A(posix)15 0 TN TL()Ec /AF f D(, +)0 16 1 A(posixpath)16 0 TN TL()Ec /AF f D(, +)0 18 1 A(string)18 0 TN TL()Ec /AF f D(, +)0 19 1 A(re)19 0 TN TL()Ec /AF f D(, +)0 23 1 A(math)23 0 TN TL()Ec /AF f D(, +)0 24 1 A(getopt)24 0 TN TL()Ec /AF f D( + +)-1 LI()0 25 1 A(List of modules In base distribution)25 0 TN TL()Ec /AF f D( + +)-1 LI()0 26 1 A(Workspace Exploration And Idiom Hints)26 0 TN TL()Ec /AF f D( + +)-1 LI()0 27 1 A(Python Mode for Emacs)27 0 TN TL()Ec /AF f D( + +)-1 LI()0 28 1 A(The Python Debugger)28 0 TN TL()Ec /AF f D()LU( + +)2 1 1 HR()0 2 2 H()WB 31 Sn()WB 1 Sn()EA(Invocation Options)EH( + +) 27 80 PR()BD(python)ES( [-diOStuvxX?] [-c )I(command)ES( | )I(script)ES( | - ] [)I(args)ES(] + +\240\240\240\240 -d\240\240 debug output from parser \201also PYTHONDEBUG=x\202 +\240\240\240\240 -i\240\240 inspect interactively after running script \201also PYTHONINSPECT=x,. +\240\240\240\240\240\240\240\240\240 and force prompts, even if stdin appears not to be a terminal +\240\240\240\240 -O\240\240 optimize generated bytecode \201set __debug__ = 0 =>s suppresses )I(assert)ES(s\202 +\240\240\240\240 -S\240\240 don't imply 'import site' on initialization +\240\240\240\240 -t\240\240 issue warnings about inconsistent tab usage \201-tt: issue errors\202 +\240\240\240\240 -u\240\240 unbuffered binary stdout and stderr \201also PYTHONUNBUFFERED=x\202. +\240\240\240\240 -v\240\240 verbose \201trace import statements\202 \201also PYTHONVERBOSE=x\202 +\240\240\240\240 -x\240\240 skip first line of source, allowing use of non-unix +\240\240\240\240\240\240\240\240\240 forms of #!cmd +\240\240\240\240 -X\240\240 disable class based built-in exceptions \201for backward +\240\240\240\240\240\240\240\240\240 compatibility management of exceptions\202 +\240\240\240\240 -?\240\240 Help! + +\240\240\240\240\240\240\240\240 -c )I(command +\240\240\240\240\240\240\240\240\240\240\240 )ES(Specify the command\240 to\240 execute\240 \201see\240 next\240 section\202. +\240\240\240\240\240\240\240\240\240\240\240 This\240 terminates the option list \201following options are +\240\240\240\240\240\240\240\240\240\240\240 passed as arguments to the command\202. +\240\240\240\240\240\240\240\240 )I(script)ES( is the name of a python file \201.py\202 to execute +\240\240\240\240\240\240\240\240 -\240 read from stdin. +\240\240\240\240\240 +\240\240\240\240 anything afterward is passed as options to python script or +\240\240\240\240\240\240\240 command, not interpreted as an option to interpreter itself. + +\240\240\240\240 )I(args)ES( are passed to script or command \201in sys.argv[1:]\202)RP( +If no script or command, Python enters interactive mode.\240 +)2 1 1 HR()0 2 3 H()WB 32 Sn()WB 2 Sn()EA(ENVIRONMENT VARIABLES)EH( + +)0 DL()DT(PYTHONHOME + +)BR(\240\240\240\240\240\240\240\240\240 Alternate )I(prefix)ES( +directory \201or )I(prefix)ES(;)I(exec_prefix)ES(\202. The default module search +path uses )I(prefix)ES(/lib +)BR(PYTHONPATH +)DD(\240Augments the default search path for module files. The format is +the same as the shell's $PATH: one or more directory pathnames separated +by ':' or ';' without spaces around \201semi-\202colons! + +)DD(On Windows first search for Registry key HKEY_LOCAL_MACHINE\200Software\200Python\200PythonCore\200v.x.y\200PythonPath + +)BR(\201default value\202. You may also define a key named after your application +with a default string value giving +)BR(the root directory path of your app. +)DT(PYTHONSTARTUP + +)DD(\240If this is the name of a readable file, the Python commands in that +file are executed before the first prompt is displayed in interactive mode +\201no default\202. + +)DT(PYTHONDEBUG + +)DD(\240If non-empty, same as -d option + +)DT(PYTHONINSPECT + +)DD(\240If non-empty, same as -i option + +)DT(PYTHONSUPPRESS + +)DD(\240If non-empty, same as -s option + +)DT(PYTHONUNBUFFERED + +)DD(\240If non-empty, same as -u option + +)DT(PYTHONVERBOSE + +)DD(\240If non-empty, same as -v option + +)DT(PYTHONCASEOK --to be verified-- + +)DD(\240If non-empty, ignore case in file/module names \201imports\202)LD( + +)2 1 1 HR()0 2 4 H()WB 33 Sn()WB 3 Sn()EA(Terms Used In This Document)EH( + +)1 DL()DT()I(sequence)ES( + +)DD(a string, list or tuple + +)DT()I(suite)ES( + +)DD(a series of statements, possibly separated by newlines. Must all be at +same indentation level, except for suites inside compound statements + +)DT(<x> + +)DD(in a syntax diagram means a token referred to as "x" + +)DT([xxx] + +)DD(in a syntax diagram means "xxx" is optional + +)DT(x ==> y + +)DD(means the value of <x> is <y> + +)DT(x <=> y + +)DD(means "x is equivalent to y")LD( + +)2 1 1 HR()0 2 5 H()WB 34 Sn()WB 4 Sn()EA(Notable lexical entities)EH( + +)0 3 6 H(Keywords)WB 35 Sn()EH( + +)BQ() 6 49 PR(and\240\240\240\240\240\240 del\240\240\240\240\240\240 for\240\240\240\240\240\240 is\240\240\240\240\240\240\240 raise\240\240\240\240 +assert\240\240\240 elif\240\240\240\240\240 from\240\240\240\240\240 lambda\240\240\240 return\240\240\240 +break\240\240\240\240 else\240\240\240\240\240 global\240\240\240 not\240\240\240\240\240\240 try\240\240\240\240\240\240 +class\240\240\240\240 except\240\240\240 if\240\240\240\240\240\240\240 or\240\240\240\240\240\240\240 while\240\240\240\240 +continue\240 exec\240\240\240\240\240 import\240\240\240 pass\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 +def\240\240\240\240\240\240 finally\240\240 in\240\240\240\240\240\240\240 print)RP()QB( + +)UL()-1 LI(\201list of keywords in std module: keyword.py\202 + +)-1 LI(Illegitimate Tokens \201only valid in strings\202: @ $ ? + +)-1 LI(A statement must all be on a single line. To break a statement over multiple +lines use "\200", as with the C preprocessor. Exception: can always break +when inside any \201\202, [], or {} pair, or in triple-quoted strings. + +)-1 LI(More than one statement can appear on a line if they are separated with +semicolons \201";"\202. + +)-1 LI(Comments start with "#" and continue to end of line.)LU( + +)0 3 7 H(Identifiers)WB 36 Sn()EH( +\240\240\240\240\240\240\240 \201letter | "_"\202\240 \201letter +| digit | "_"\202* +)UL()-1 LI(Python identifiers keywords, attributes, etc. are )BD(case-sensitive)ES(. + +)-1 LI(Special forms: )BD(_)ES()I(ident)ES( \201not imported by 'from module import +*'\202; )BD(__)ES()I(ident)ES()BD(__)ES( \201system defined name\202; + +)BR(\240\240\240\240\240\240\240\240\240\240 )BD(__)ES()I(ident)ES( +\201class-private name mangling\202)LU( + +)0 3 8 H(Operators)WB 37 Sn()EH( + +)BQ(\240+\240\240\240\240\240\240 -\240\240\240\240\240\240 +*\240\240\240\240\240\240 **\240\240\240\240\240 +/\240\240\240\240\240\240 % +)BR(<<\240\240\240\240\240 >>\240\240\240\240\240 +&\240\240\240\240\240\240 |\240\240\240\240\240\240 +^\240\240\240\240\240\240 ~ +)BR(<\240\240\240\240\240\240 >\240\240\240\240\240\240 +<=\240\240\240\240\240 >=\240\240\240\240\240 ==\240\240\240\240\240 +!=\240\240\240\240\240 <>)QB( + +)0 3 9 H(Strings)WB 38 Sn()EH( +)BD(")ES(a string enclosed by double quotes)BD(")ES( +)BR()BD(')ES(another string delimited by single quotes and with a " inside)BD(')ES( +)BR()BD(''')ES(a string containing embedded newlines and quote \201'\202 marks, +can be +)BR(delimited with triple quotes.)BD(''')ES( +)BR(""" may also use 3- double quotes as delimiters """ +)BR()BD(r')ES(a raw string where \200 are kept \201literalized\202: handy for regular +expressions and windows paths!)BD(')ES( +)BR()BD(R")ES(another raw string)BD("\240\240\240 --)ES( raw strings +cannot end with a \200 +)UL()-1 LI(Use )BD(\200)ES( at end of line to continue a string on next line. + +)-1 LI(adjacent strings are concatened, e.g. 'Monty' ' Python' is the same as +'Monty Python'.)LU( + +)0 4 10 H(String)WB 39 Sn( Literal Escapes)EH( + +) 7 79 PR(\240\240\240\240 )BD(\200)I(newline)ES()ES(\240 Ignored \201escape newline\202 +\240\240\240\240 )BD(\200\200)ES( Backslash \201\200\202\240\240\240\240\240\240\240 )BD(\200e)ES( Escape \201ESC\202\240\240\240\240\240\240\240\240\240\240\240 )BD(\200v)ES( Vertical Tab \201VT\202 +\240\240\240\240 )BD(\200')ES( Single quote \201'\202\240\240\240\240 )BD(\200f)ES( Formfeed \201FF\202\240\240\240\240\240\240\240\240\240\240 )BD(\2000OO)ES(\240 \201zero\202 char with\240 +\240\240\240\240 )BD(\200")ES( Double quote \201"\202\240\240\240\240 )BD(\200n)ES( Linefeed \201LF\202\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 octal value OO +\240\240\240\240 )BD(\200a)ES( Bell \201BEL\202\240\240\240\240\240\240\240\240\240\240 )BD(\200r)ES( Carriage Return \201CR\202\240\240\240 )BD(\200xXX)ES(\240 char with\240 +\240\240\240\240 )BD(\200b)ES( Backspace \201BS\202\240\240\240\240\240\240 )BD(\200t)ES( Horizontal Tab \201TAB\202\240\240\240\240\240\240\240\240\240 hex value XX +\240\240\240\240 )BD(\200)I(AnyOtherChar)ES()ES( is left as-is)RP( + +)UL()-1 LI(NULL byte \201\200000\202 is NOT an end-of-string marker; NULL's may be embedded +in strings. + +)-1 LI(Strings \201and tuples\202 are )UN(immutable)NU(: they cannot be modified.)LU( + +)0 3 11 H(Numbers)WB 40 Sn()EH( +Decimal integer: 1234, 1234567890546378940)BD(L)ES(\240\240\240\240\240\240\240 +\201or )BD(l\202)ES( +)BR(Octal integer: )BD(0)ES(177, )BD(0)ES(177777777777777777L \201begin with +a )BD(0)ES(\202 +)BR(Hex integer: )BD(0x)ES(FF, )BD(0X)ES(FFFFffffFFFFFFFFFFL \201begin with +)BD(0x)ES( +or )BD(0X)ES(\202 +)BR(Long integer \201unlimited precision\202: 1234567890123456)BD(L)ES( \201ends +with )BD(L)ES( or)BD( l)ES(\202 +)BR(Float \201double precision\202: 3)BD(.)ES(14)BD(e-10)ES(, .001, 10., 1E3 +)BR(Complex: 1)BD(J)ES(, 2)BD(+)ES(3)BD(J)ES(, 4)BD(+)ES(5)BD(j )ES(\201ends with +)BD(J)ES( +or )BD(j, +)ES( separates real and imaginary parts which are both floats\202 +)0 3 12 H(Sequences)WB 41 Sn()EH( + +)UL()-1 LI()UN(String)NU( of length 0, 1, 2 \201see above\202 + +)BR('', '1', "12" +)-1 LI()UN(Tuple)NU( of length 0, 1, 2, etc: + +)BR()BD(\201\202)ES( \2011,\202 \2011,2\202\240\240\240\240 # parentheses are optional +if len > 0 +)-1 LI()UN(List)NU( of length 0, 1, 2, etc: + +)BR()BD([])ES( [1] [1,2])LU( +Indexing is 0-based. Negative indices \201usually\202 mean count backwards from +end of sequence. +)0 P(Sequence )UN(slicing)NU()BD( [)ES()I(starting-at-index)ES( )BD(: )ES()I(but-less-than-index)ES()BD(].)ES(Start +defaults to '0'; End defaults to 'sequence-length'. +)UL(a = \2010,1,2,3,4,5,6,7\202 +)BR(a[3] ==> 3 +)BR(a[-1] ==> 7 +)BR(a[2:4] ==> \2012, 3\202 +)BR(a[1:] ==> \2011, 2, 3, 4, 5, 6, 7\202 +)BR(a[:3] ==> \2010, 1, 2\202 +)BR(a[:] ==> \2010,1,2,3,4,5,6,7\202\240 # makes a )BD(copy)ES( of the sequence.)LU( + +)0 3 13 H(Dictionaries)WB 42 Sn( \201Mappings\202)EH( +)UN(Dictionary)NU( of length 0, 1, 2, etc: +)BR()BD({})ES( {1 : 'first'} {1 : 'first',\240 'next': 'second'} +)0 P()2 1 1 HR()0 2 14 H()WB 43 Sn()WB 5 Sn()EA(Basic Types and Their Operations)EH( + +)0 3 15 H(Comparisons)WB 44 Sn( \201defined between *any* types\202)EH( + +) 8 67 PR(\240\240\240\240\240\240\240 <\240\240\240\240\240\240 strictly less than\240\240\240\240\240\240 +\240\240\240\240\240\240\240 <=\240\240\240\240\240 less than or equal\240\240\240\240\240\240 +\240\240\240\240\240\240\240 >\240\240\240\240\240\240 strictly greater than\240\240\240 +\240\240\240\240\240\240\240 >=\240\240\240\240\240 greater than or equal\240\240\240 +\240\240\240\240\240\240\240 ==\240\240\240\240\240 equal\240\240\240 +\240\240\240\240\240\240\240 !=\240\240\240\240\240 not equal\240 \201 "<>" is also allowed\202 +\240\240\240\240\240\240\240 is\240\240\240\240\240 object identity \201are )BD(objects)ES( identical, not values\202 +\240\240\240\240\240\240\240 is not\240 negated object identity)RP( +X < Y < Z < W has expected meaning, unlike C +)0 3 16 H(Boolean)WB 45 Sn( values and operators)EH( + +) 8 78 PR(\240\240\240\240\240 )BD(False)ES( values:\240\240\240\240 None, numeric zeros, empty sequences and mappings +\240\240\240\240\240 )BD(True)ES( values:\240\240\240\240\240 all other values + +\240\240\240\240\240 )BD(not)ES( X: if X is false then 1, else 0 +\240\240\240\240\240 X )BD(or)ES( Y: if X is false then Y, else X +\240\240\240\240\240 X )BD(and)ES( Y: if X is false then X, else Y + +\240\240\240\240\240 \201'or', 'and' evaluate second arg only if necessary to determine outcome\202)RP( + +)0 3 17 H(None)WB 46 Sn()EH( +None is used as default return value on functions. +)BR(Input that evaluates to None does not print when running Python interactively. +)0 3 18 H(Numeric)WB 47 Sn( types)EH( + +)0 4 19 H(Floats,)WB 48 Sn( integers and long integers.)EH( +Floats are implemented with C doubles. +)BR(Integers are implemented with C longs. +)BR(Long integers have unlimited size \201only limit is system resources\202 +)0 4 20 H(Operators)WB 49 Sn( on all numeric types)EH( + +) 13 52 PR(\240\240\240\240\240\240\240 )BD(abs)ES(\201x\202\240 absolute value of x\240\240\240\240\240 +\240\240\240\240\240\240\240 )BD(int)ES(\201x\202\240 x converted to integer\240\240 +\240\240\240\240\240\240\240 )BD(long)ES(\201x\202 x converted to long integer\240\240\240\240\240 +\240\240\240\240\240\240\240 )BD(float)ES(\201x\202 x converted to floating point\240\240\240 +\240\240\240\240\240\240\240 )BD(-)ES(x\240\240\240\240\240 x negated\240\240\240\240\240\240\240 +\240\240\240\240\240\240\240 )BD(+)ES(x\240\240\240\240\240 x unchanged\240\240\240\240\240 +\240\240\240\240\240\240\240 x )BD(+)ES( y\240\240 sum of x and y\240\240 +\240\240\240\240\240\240\240 x )BD(-)ES( y\240\240 difference of x and y\240\240\240 +\240\240\240\240\240\240\240 x )BD(*)ES( y\240\240 product of x and y\240\240\240\240\240\240 +\240\240\240\240\240\240\240 x )BD(/)ES( y\240\240 quotient of x and y\240\240\240\240\240 +\240\240\240\240\240\240\240 x )BD(%)ES( y\240\240 remainder of x / y +\240\240\240\240\240\240\240 )BD(divmod)ES(\201x, y\202 the tuple \201x/y, x%y\202 +\240\240\240\240\240\240\240 x )BD(**)ES( y\240 x to the power y [same as: )BD(pow)ES(\201x,y\202])RP( + +)0 4 21 H(Bit)WB 50 Sn( operators on integers and long integers)EH( + +) 6 48 PR(\240\240\240\240\240\240\240 )BD(~)ES(x\240\240\240\240\240 the bits of x inverted\240\240 +\240\240\240\240\240\240\240 x )BD(^)ES( y\240\240 bitwise exclusive or of x and y\240 +\240\240\240\240\240\240\240 x )BD(&)ES( y\240\240 bitwise and of x and y\240\240 +\240\240\240\240\240\240\240 x )BD(|)ES( y\240\240 bitwise or of x and y\240\240\240 +\240\240\240\240\240\240\240 x )BD(<<)ES( n\240 x shifted left by n bits\240\240\240\240\240\240\240\240 +\240\240\240\240\240\240\240 x )BD(>>)ES( n\240 x shifted right by n bits)RP( + +)0 4 22 H(Complex)WB 51 Sn( Numbers)EH( +represented as a pair of machine-level double precision floating point +numbers. +)BR(The real and imaginary value of a complex number z can be retrieved +through the +)BR(attributes )UN(z.real)NU( and )UN(z.imag)NU(. +)0 4 23 H(Numeric)WB 52 Sn( exceptions)EH( + +)1 DL()DT(TypeError + +)DD(raised on application of arithmetic operation to non-number + +)DT(OverflowError + +)DD(\240numeric bounds exceeded + +)DT(ZeroDivisionError + +)DD(\240raised when zero second argument of div or modulo op)LD( + +)0 3 24 H(Operations)WB 53 Sn( on all sequence types \201lists, tuples, strings\202)EH( + +)2 Al()0 PT()Ea( + +) 1 7 PR()UN(Notes)NU( :)RP( +\240\240)-1 Bf add FZ(\240 \2011\202 if )I(i)ES( or )I(j)ES( is negative, +the index is relative to the end of the string, ie )3 FZ(len\201)I(s)ES(\202+ +)I(i)ES()Ef( +or )3 FZ(len\201)I(s)ES(\202+)I(j)ES()Ef( is)Ef( +)BR()-1 Bf add FZ(\240\240\240\240\240\240\240\240 substituted. +But note that -0 is still 0.)Ef( +)BR()-1 Bf add FZ(\240\240\240 \2012\202 The slice of )I(s)ES( from )I(i)ES( +to )I(j)ES( is defined as the sequence of items with index )I(k)ES( such +that )I(i <= k < j)ES(.)Ef( +)BR()-1 Bf add FZ(\240\240\240\240\240\240\240\240\240 +If )I(i)ES( or )I(j)ES( is greater than)3 FZ(len\201)I(s)ES(\202)Ef(, use)3 FZ( len\201)I(s)ES(\202)Ef(. +If )I(i)ES( is omitted, use len\201)I(s)ES(\202. If )I(i)ES( is greater than +or)Ef( +)BR()-1 Bf add FZ(\240\240\240\240\240\240\240\240\240 +equal to )I(j)ES(, the slice is empty.)Ef( +)0 3 25 H(Operations)WB 54 Sn( on mutable \201=modifiable\202 sequences \201lists\202)EH( + +)2 Al()1 PT()Ea( + +)0 P()UN(Notes)NU( : +)BR(\240\240)-1 Bf add FZ(\240 \2011\202 raise a ValueError exception when +)I(x)ES( +is not found in )I(s)ES( \201i.e. out of range\202.)Ef( +)BR()-1 Bf add FZ(\240\240\240\240 \2012\202 The sort\201\202 method takes +an optional argument specifying a comparison fct of 2 arguments \201list items\202 +which should)Ef( +)BR()-1 Bf add FZ(\240\240\240\240\240\240\240\240\240 +return -1, 0, or 1 depending on whether the 1st argument is considered +smaller than, equal to, or larger than the 2nd)Ef( +)BR()-1 Bf add FZ(\240\240\240\240\240\240\240\240\240 +argument. Note that this slows the sorting process down considerably.)Ef( +)BR()-1 Bf add FZ(\240\240\240\240 \2013\202 The sort\201\202 and reverse\201\202 +methods )BD(modify)ES( the list )BD(in place)ES( for economy of space when +sorting or reversing a large list.)Ef( +)BR()-1 Bf add FZ(\240\240\240\240\240\240\240\240\240\240 +They don't return the sorted or reversed list to remind you of this side +effect.)Ef( +)BR()-1 Bf add FZ(\240\240\240\240 \2014\202 [)I(New 1.5.2)ES(] The pop\201\202 +method is experimental and not supported by other mutable sequence types +than lists.)Ef( +)BR()-1 Bf add FZ(\240\240\240\240\240\240\240\240\240 +The optional\240 argument i defaults to -1, so that by default the last +item is removed and returned.)Ef( +)BR()-1 Bf add FZ(\240\240\240\240 \2015\202 [)I(New 1.5.2)ES(] Experimental +! Raises an exception when x is not a list object.)Ef( +)BR(\240 +)BR(\240 +)0 3 26 H(Operations)WB 55 Sn( on mappings \201dictionaries\202)EH( + +)2 Al()2 PT()Ea( + +)BQ()BQ()BQ()UN(Notes)NU( : +)BR()-1 Bf add FZ(\240 TypeError is raised if key is not acceptable)Ef( +)BR()-1 Bf add FZ(\240 \2011\202 KeyError is raised if key k is not in the +map)Ef( +)BR()-1 Bf add FZ(\240 \2012\202 Keys and values are listed in random order)Ef( +)BR()-1 Bf add FZ(\240 \2013\202 )I(d2)ES( must be of the same type as )I(d1)ES()Ef( +)BR()-1 Bf add FZ()I(\240 \201)ES(4\202 Never raises an exception if )I(k)ES( +is not in the map, instead it returns )I(defaultVal)ES(.)Ef( +)BR()-1 Bf add FZ()I(\240\240\240\240\240 defaultVal)ES( is optional, +when not provided and )I(k)ES( is not in the map, None is returned.)Ef()QB()QB()QB( + +)0 3 27 H(Format)WB 56 Sn( operator for strings \201%\202)EH( + +)0 4 28 H()WB 57 Sn()3 FZ(Uses C )Ef(printf format codes :)EH( +Supports: %, c, s, i, d, u, o, x, X, e, E, f, g, G. +)0 P(Width and precision may be a * to specify that an integer argument specifies +the actual width or precision. +)0 P(The flag characters -, +, blank, # and 0 are understood. +)0 P(%s will convert any type argument to string \201uses )I(str\201\202)ES( function\202 +) 2 54 PR(\240\240\240\240\240\240\240 a = '%s has %03d quote types.' )BD(%)ES( \201'Python', 2\202 +\240\240\240\240\240\240\240 a ==> 'Python has 002 quote types.')RP( +Right-hand-side can be a )I(mapping)ES(: +) 1 73 PR(\240\240\240\240\240\240\240 a = '%)BD(\201lang\202)ES(s has %)BD(\201c\202)ES(03d quote types.' % {'c':2, 'lang':'Python})RP( +\201)I(vars\201\202)ES( function very handy to use on right-hand-side.\202 +)0 3 29 H()WB 58 Sn()WB [16#00 16#00 16#00] Sc()3 FZ(File Objects)Ef()Ec()EH( +Created with built-in function )I(open\201\202)ES(; may be created by other modules's +functions as well. +)0 4 30 H(Operators)WB 59 Sn( on file objects)EH( + +) 20 89 PR(\240\240\240\240\240\240\240 f.)BD(close)ES(\201\202\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 close file f. +\240\240\240\240\240\240\240 f.)BD(fileno)ES(\201\202\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 get fileno \201fd\202 for f. +\240\240\240\240\240\240\240 f.)BD(flush)ES(\201\202\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 flush file's internal buffer. +\240\240\240\240\240\240\240 f.)BD(isatty)ES(\201\202\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 1 if file is connected to a tty-like dev, else 0 +\240\240\240\240\240\240\240 f.)BD(read)ES(\201[size]\202\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 read at most )I(size)ES( bytes from file and return +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 as a string object. If )I(size)ES( omitted, read to EOF. + +\240\240\240\240\240\240\240 f.)BD(readline)ES(\201\202\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 read one entire line from file +\240\240\240\240\240\240\240 f.)BD(readlines)ES(\201\202\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 read until EOF with readline\201\202 and return list +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 of lines read. + +\240\240\240\240\240\240\240 f.)BD(seek)ES(\201offset, whence=0\202\240\240\240\240\240\240\240 set file's position, like\240 +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 "stdio's fseek\201\202".\240 +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 whence == 0 then use absolute indexing +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 whence == 1 then offset relative to current pos +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 whence == 2 then offset relative to file end + +\240\240\240\240\240\240\240 f.)BD(tell)ES(\201\202\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 return file's current position +\240\240\240\240\240\240\240 f.)BD(write)ES(\201str\202\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 Write string to file. +\240\240\240\240\240\240\240 f.)BD(writelines)ES(\201list\202\240\240\240\240\240\240\240\240\240\240\240\240\240 Write list of strings to file.)RP( + +)0 4 31 H(File)WB 60 Sn( Exceptions)EH( + +)0 DL()DT(EOFError + +)DD(\240End-of-file hit when reading \201may be raised many times, e.g. if )I(f)ES( +is a tty\202. + +)DT(IOError + +)DD(\240Other I/O-related I/O operation failure)LD( + +)2 1 1 HR()0 2 32 H()WB 61 Sn()WB 6 Sn()EA(Advanced Types)EH( +)I(-See manuals for more details)ES( - +)UL()-1 LI()I(Module)ES( objects + +)-1 LI()I(Class)ES( objects + +)-1 LI()I(Class instance)ES( objects + +)-1 LI()I(Type)ES( objects \201see module: types\202 + +)-1 LI()I(File)ES( objects \201see above\202 + +)-1 LI()I(Slice)ES( objects + +)-1 LI()I(XRange)ES( objects + +)-1 LI(Callable types: + +)UL()-1 LI(User-defined \201written in Python\202: + +)UL()-1 LI(User-defined )I(Function)ES( objects + +)-1 LI(User-defined )I(Method)ES( objects)LU( + +)-1 LI(Built-in \201written in C\202: + +)UL()-1 LI(Built-in )I(Function)ES( objects + +)-1 LI(Built-in )I(Method)ES( objects)LU()LU( + +)-1 LI(Internal Types: + +)UL()-1 LI()I(Code)ES( objects \201byte-compile executable Python code: )I(bytecode)ES(\202 + +)-1 LI()I(Frame)ES( objects \201execution frames\202 + +)-1 LI()I(Traceback)ES( objects \201stack trace of an exception\202)LU()LU( + +)2 1 1 HR()0 2 33 H()WB 62 Sn()WB 7 Sn()EA(Statements)EH( + +) 25 77 PR()BD(pass)ES(\240\240\240\240\240\240\240\240\240\240\240 -- Null statement +)BD(=)ES(\240\240\240\240\240\240\240\240\240\240\240\240\240\240 -- Assignment operator. Can unpack tuples, lists, strings +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 first, second = a[0:2]; [f, s] = range\2012\202; c1,c2,c3='abc' +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 Tip: x,y = y,x swaps x and y. +)BD(del)ES( <name>[,<name>]* -- Unbind name\201s\202 from object. Object will be indirectly +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 \201and automatically\202 deleted only if no longer referenced. +)BD(print)ES( [<c1> [, <c2> ]* [,] +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 -- Writes to sys.stdout. +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 Puts spaces between arguments. Puts newline at end +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 unless statement ends with comma. +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 Print is not required when running interactively, +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 simply typing an expression will print its value, +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 unless the value is None. +)BD(exec)ES( <x> [in <globals> [,<locals>]] +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 -- Executes <x> in namespaces provided. Defaults +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 to current namespaces. <x> can be a string, file +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 object or a function object. +)BD(f)ES(\201<value>,... [<id>=<value>]\202 +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 -- Call function 'f' with parameters. Parameters can +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 be passed by name or be omitted if function\240 +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 defines default values. E.g. for 'f' is defined as +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 "def f\201p1=1, p2=2\202" +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 "f\201\202"\240\240\240\240\240\240 <=>\240 "f\2011, 2\202" +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 "f\20110\202"\240\240\240\240 <=>\240 "f\20110, 2\202" +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 "f\201p2=99\202"\240 <=>\240 "f\2011, 99\202")RP( + +)0 3 34 H(Control)WB 63 Sn( Flow)EH( + +) 24 132 PR()BD(if)ES( <condition)I(>)ES()BD(:)ES( <suite)I(>)ES([)BD(elif)ES( <condition)I(>)ES()BD(:)ES( <suite)I(>)ES(]* +[)BD(else:)ES( <suite)I(>)ES(] +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 -- usual if/else_if/else statement + +)BD(while)ES( <condition>)BD(:)ES( <suite> +[)BD(else:)ES( <suite>] +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 -- usual while statement. "else" suite is executed +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 after loop exits, unless the loop is exited with +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 "break" + +)BD(for)ES( <target> )BD(in)ES( <condition-list>)BD(:)ES( <suite> +[)BD(else:)ES( <suite>] +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 -- iterates over sequence "<condition-list>", +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 assigning each element to "<target>". Use built-in )I(range)ES(\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 function to iterate a number of times. +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 "else" suite executed at end unless loop exited +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 with "break" + +)BD(break)ES(\240\240\240\240\240\240\240\240\240\240 -- immediately exit "for" or "while" loop + +)BD(continue)ES(\240\240\240\240\240\240\240 -- immediately do next iteration of "for" or "while" loop + +)BD(return)ES( [<result>] +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 -- return from function \201or method\202 and return +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 "<result>". If no result given, then returns )I(None)ES(.)RP( + +)0 3 35 H(Exception)WB 64 Sn( Statements)EH( + +) 3 78 PR()BD(assert)ES( expr[, message] +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 -- expr is evaluated. if false, raise exception AssertionError +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 with message. Inhibited if __debug__ is 0.)RP( + +) 37 72 PR()BD(try:)ES( <suite1> +[)BD(except)ES( [<exception> [, <value>])BD(:)ES( <suite2>]+ +[)BD(else:)ES( <suite3>] +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 -- statements in <suite1> are executed. If an +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 exception occurs, look in "except" clauses for +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 matching <exception>. If matches or bare "except" +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 execute suite of that clause. If no exception happens +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 suite in "else" clause is executed after <suite1>. +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 If <exception> has a value, it is put in <value>. +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 <exception> can also be tuple of exceptions, e.g. +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 "except \201KeyError, NameError\202, val: print val" + +)BD(try:)ES( <suite1> +)BD(finally:)ES( <suite2> +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 -- statements in <suite1> are executed. If no +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 exception, execute <suite2> \201even if <suite1> is +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 exited with a "return", "break" or "continue" +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 statement\202. If exception did occur, executes\240 +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 <suite2> and them immediately reraises exception. + +)BD(raise)ES( <exception> [,<value> [,<traceback>]] +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 -- raises <exception> with optional value +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 <value>. Parameter <traceback> +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 specifies a traceback object to use when printing +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 the exception's backtrace. +)BD(raise)ES(\240\240\240\240\240\240\240\240\240\240\240 -- a raise statement without arguments re-raises +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 the last exception raised in the current function + +An exception is either a )I(string)ES( \201object\202 or a )I(class instance)ES(. +Can create a new one simply by creating a new string: +)WR( +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 my_exception = 'You did something wrong' +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 )BD(try)ES(:\240 +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 if bad:\240 +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 )BD(raise)ES( my_exception, bad +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 )BD(except)ES( my_exception, value:\240 +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 print 'Oops', value)RP( + +) 1 75 PR(Exception classes must be derived from the predefined class: Exception, eg:)RP( + +) 15 70 PR(\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 class text_exception\201Exception\202: +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 )BD(try)ES(: +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 if bad: +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 )BD(raise)ES( text_exception\201\202 +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 # This is a shorthand for the form +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 # "raise <class>, <instance>" +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 )BD(except)ES( Exception: +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 print 'Oops' +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 # This will be printed because +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 # text_exception is a subclass of Exception + +When an error message is printed for an unhandled exception which is a +class, the class name is printed, then a colon and a space, and +finally the instance converted to a string using the built-in function +str\201\202.)RP( + +) 2 65 PR(All built-in exception classes derives from StandardError, itself +derived from Exception.)RP( + +)0 3 36 H(Name)WB 65 Sn( Space Statements)EH( +[1.51: On Mac & Windows, the case of module file names must now match +the case as used +)BR(\240 in the )I(import)ES( statement] +) 4 78 PR()I(Packages)ES( \201>1.5\202: a package is a name space which maps to a directory including +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 module\201s\202 and the special initialization module '__init__.py' +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 \201possibly empty\202. Packages/dirs can be nested. You address a +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 module's symbol via '[package.[package...]module.symbol's.)RP( + +) 32 91 PR()BD(import)ES( <module_id1> [, <module_id2>]* +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 -- imports modules. Members of module must be\240 +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 referred to by qualifying with [package.]module name: +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 "import sys; print sys.argv:" +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 "import package1.subpackage.module; package1.subpackage.module.foo\201\202" + +)BD(from)ES( <module_id> )BD(import)ES( <id1> [, <id2>]* +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 -- imports names from module <module_id>. Names +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 are not qualified: +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 "from sys import argv; print argv" +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 "from package1 import module; module.foo\201\202" +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 "from package1.module import foo; foo\201\202" + +)BD(from)ES( <module_id> )BD(import *)ES(\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 -- imports all names in module <module_id>, except +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 those starting with "_"; *to be used sparsely* : +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 "from sys import *; print argv" +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 "from package.module import *; print x' + +)BD(global)ES( <id1> [,<id2>]* +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 -- ids are from global scope \201usually meaning from module\202 +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 rather than local \201usually meaning only in function\202. +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 -- E.g. in fct without "global" statements, assuming +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 "a" is name that hasn't been used in fct or module +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 so far: +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 -Try to read from "a" -> NameError +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 -Try to write to "a" -> creates "a" local to fcn +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 -If "a" not defined in fct, but is in module, then +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 -Try to read from "a", gets value from module +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 -Try to write to "a", creates "a" local to fct + +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 But note "a[0]=3" starts with search for "a",)WR( +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 will use to global "a" if no local "a".)RP( + +)0 3 37 H(Function)WB 66 Sn( Definition)EH( + +) 13 71 PR()BD(def)ES( <func_id> \201[<param_list>]\202)BD(:)ES( <suite> +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 -- creates a function object and assigns it name\240 +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 <func_id>. + +<param_list> ==> [<id> [, <id>]*] [<id> = +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 <v> [, +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 <id> = +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 <v>]*] +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 [*<id>]\240 +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 [**<id>] +[Args are passed by )BD(value)ES(.Thus only args representing a )I(mutable)ES( object +can be modified \201are )I(inout)ES( parameters\202. Use a )BD(tuple)ES( to return more than +one value])RP( + +) 9 68 PR(E.g. +\240\240\240\240\240\240\240 )BD(def)ES( test \201p1, p2 = 1+1, *rest, **keywords\202: +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 -- Parameters with "=" have default value \201<v> is +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 evaluated when function defined\202. +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 If list has "*<id>" then <id> is assigned +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 a tuple of all remaining args passed to function. +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 \201allows vararg functions\202. +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 If list has "**<id>" then <id> is assigned +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 a dictionary of all arguments passed as keywords.)RP( + +)0 3 38 H(Class)WB 67 Sn( Definition)EH( + +) 38 85 PR()BD(class)ES( <class_id> [\201<super_class1> [,<super_class2>]*\202]: <suite> +\240\240\240\240\240\240\240 -- Creates a class object and assigns it name <class_id> +\240\240\240\240\240\240\240\240\240\240 <suite> may contain local "defs" of class methods and +\240\240\240\240\240\240\240\240\240\240 assignments to class attributes. +E.g. +\240\240\240\240\240\240 )BD(class)ES( my_class \201class1, class_list[3]\202: ... +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 Creates a class object inheriting from both "class1" and whatever\240\240 +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 class object "class_list[3]" evaluates to. Assigns new +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 class object to name "my_class". + +\240\240\240\240\240\240\240 -First arg to class methods is always instance object, called ')BD(self)ES(' +\240\240\240\240\240\240\240\240 by convention. +\240\240\240\240\240\240\240 -Special method )BD(__init__)ES(\201\202 is called when instance is created. +\240\240\240\240\240\240\240 -Special method )BD(__del__)ES(\201\202 called when no more reference to object. +\240\240\240\240\240\240\240 -Create instance by ")I(calling)ES(" class object, possibly with arg +\240\240\240\240\240\240\240\240 \201thus instance=apply\201aClassObject, args...\202 creates an instance!\202 +\240\240\240\240\240\240\240 -In current implementation, can't subclass off built-in +\240\240\240\240\240\240\240\240 classes. But can "wrap" them, see __getattr__\201\202 below. + + +E.g. +\240\240\240\240\240\240\240 class c \201c_parent\202:\240 +\240\240\240\240\240\240\240\240\240\240 def __init__\201self, name\202: self.name = name +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 def print_name\201self\202: print "I'm", self.name +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 def call_parent\201self\202: c_parent.print_name\201self\202 + +\240\240\240\240\240\240\240\240\240\240\240\240\240\240 instance = c\201'tom'\202 +\240\240\240\240\240\240\240\240\240\240\240\240\240\240 print instance.name\240 +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 'tom' +\240\240\240\240\240\240\240\240\240\240\240\240\240\240 instance.print_name\201\202 +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 "I'm tom")WR( + +\240\240\240\240\240\240\240 Call parent's super class by accessing parent's method +\240\240\240\240\240\240\240 directly and passing "self" explicitly \201see "call_parent" +\240\240\240\240\240\240\240 in example above\202. + +\240\240\240\240\240\240\240 Many other special methods available for implementing +\240\240\240\240\240\240\240 arithmetic operators, sequence, mapping indexing, etc.)RP( + +)0 4 39 H(Documentation)WB 68 Sn( Strings)EH( +Modules, classes and functions may be documented by placing a string literal +by itself as the first statement in the suite. The documentation can be +retrieved by getting the ')BD(__doc__)ES(' attribute from the module, class +or function. +) 8 63 PR(Example: +\240\240\240\240\240\240\240 class c: +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 "A description of 'c'" +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 def __init__\201self\202: +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 "A description of the constructor" +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 # etc. +Then c.__doc__ <=> "A description of 'c'". +Then c.__init__.__doc__ <=> "A description of the constructor".)RP( + +)0 3 40 H(Others)WB 69 Sn()EH( + +) 5 74 PR()BD(lambda)ES( [<param_list>]: <returnedExpr> +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 -- Create an anonymous function. <returnedExpr> must be +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 an expression, not a statement \201e.g., not "if xx:...",\240 +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 "print xxx", etc.\202 and thus can't contain newlines. +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 Used mostly for filter\201\202, map\201\202, reduce\201\202 functions.)RP( + +)2 1 1 HR()0 2 41 H()WB 70 Sn()WB 8 Sn()EA(Built-In Functions)EH( + +) 30 85 PR()BD(__import__)ES(\201name[, globals[, locals[, fromlist]]]\202 +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 Import module within the given context \201see lib ref for more details\202 + +)BD(abs)ES(\201x\202\240\240\240\240\240\240\240\240\240 Return the absolute value of a number + +)BD(apply)ES(\201f, args[, keywords]\202 +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 Call func/method <f> with args <args> and optional keywords + +)BD(callable)ES(\201x\202\240\240\240\240 Returns 1 if x callable, else 0. + +)BD(chr)ES(\201i\202\240\240\240\240\240\240\240\240\240 Return one-character string whose ASCII code is +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 integer i + +)BD(cmp)ES(\201x,y\202\240\240\240\240\240\240\240 Return neg, zero, pos if x <, ==, > to y + +)BD(coerce)ES(\201x,y\202\240\240\240\240 Return a tuple of the two )I(numeric)ES( arguments converted to +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 a common type. + +)BD(compile)ES(\201string, filename, kind\202\240 +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 Compile <string> into a code object. +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 <filename> is used in error message, can be any string. It is +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 usually the file from which the code was read, or eg. '<string>' +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 if not read from file. +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 <kind> can be 'eval' if <string> is a single stmt, or 'single' +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 which prints the output of expression statements that +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 evaluate to something else than "None" or be 'exec'. + +)BD(complex)ES(\201real[, image]\202 +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 Build a complex object \201can also be done using J or j suffix, +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 e.g. 1+3J\202)RP( + +) 2 79 PR()BD(delattr)ES(\201obj, name\202 +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 deletes attribute named <name> of object <obj> <=> del obj.name)RP( + +) 15 76 PR()BD(dir)ES(\201[object]\202\240\240 If no args, return the list of names in current local +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 symbol table. With a module, class or class instance +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 object as arg, return list of names in its attr dict. + +)BD(divmod)ES(\201a,b\202\240\240\240\240 Returns tuple of \201a/b, a%b\202 + +)BD(eval)ES(\201s, globals, locals\202 +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 Eval string <s> in \201optional\202 <globals>, <locals>.\240 +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 <s> must have no NULL's or newlines. <s> can also be a +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 code object. + +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 E.g.: x = 1; incr_x = eval\201'x + 1'\202 + +)BD(execfile)ES(\201file[, globals[, locals]]\202 +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 Execute a file without creating a new module, unlike import.)RP( + +) 21 151 PR()BD(filter)ES(\201function, sequence\202 +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 Construct a list from those elements of <sequence> for which +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 <function> returns true. <function> takes one parameter. + +)BD(float)ES(\201x\202\240\240\240\240\240\240\240 Convert a number or a string to floating point.\240 + +)BD(getattr)ES(\201object, name[, default]\202\202\240\240\240 )-1 Bf add FZ([<default> arg added in 1.5.2])Ef(\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 Get attr called <name> from <object>, e.g. getattr\201x, 'f'\202 <=> x.f\202. +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 If not found, raise AttributeError or return <default> if specified. +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 +)BD(globals)ES(\201\202\240\240\240\240\240\240 Returns a dictionary containing current global variables. + +)BD(hasattr)ES(\201object, name\202 +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 Returns true if <object> has attr called <name>. + +)BD(hash)ES(\201object\202\240\240\240 Return the hash value of the object \201if it has one\202 + +)BD(hex)ES(\201x\202\240\240\240\240\240\240\240\240\240 Convert a number to a hexadecimal string. + +)BD(id)ES(\201object\202\240\240\240\240\240 Return a unique 'identity' integer for an object. + +)BD(input)ES(\201[prompt]\202 Prints prompt, if given. Reads input and evaluates it.)RP( + +) 7 69 PR()BD(int)ES(\201x\202\240\240\240\240\240\240\240\240\240 Convert a number or a string to a plain integer. + +)BD(intern)ES(\201aString\202 +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 Enter <String> in the table of "interned strings" and +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 return the string. Interned strings are 'immortals'. +)BD(isinstance)ES(\201obj, class\202 +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 return true if <obj> is an instance of <class>)RP( + +) 2 64 PR()BD(issubclass)ES(\201class1, class2\202 +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 return true if <class1> is derived from <class2>)RP( + +) 6 68 PR()BD(len)ES(\201s\202\240\240\240\240\240\240\240\240\240 Return the length \201the number of items\202 of an object +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 \201sequence or dictionary\202. + +)BD(list)ES(\201sequence\202 +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 Convert <sequence> into a list. If already a list, +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 return a copy of it.)RP( + +) 62 74 PR()BD(locals)ES(\201\202\240\240\240\240\240\240\240 Return a dictionary containing current local variables. + +)BD(long)ES(\201x\202\240\240\240\240\240\240\240\240 Convert a number or a string to a long integer. + +)BD(map)ES(\201function, list, ...\202 +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 Apply <function> to every item of <list> and return a list +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 of the results.\240 If additional arguments are passed,\240 +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 <function> must take that many arguments and it is given +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 to <function> on each call. + +)BD(max)ES(\201s\202\240\240\240\240\240\240\240\240\240 Return the largest item of a non-empty sequence. + +)BD(min)ES(\201s\202\240\240\240\240\240\240\240\240\240 Return the smallest item of a non-empty sequence. + +)BD(oct)ES(\201x\202\240\240\240\240\240\240\240\240\240 Convert a number to an octal string. + +)BD(open)ES(\201filename [, mode='r', [bufsize=<implementation dependent>]]\202 +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 Return a new file object. First two args are same as\240 +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 those for C's "stdio open" function. <bufsize> is 0 +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 for unbuffered, 1 for line-buffered, negative for +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 sys-default, all else, of \201about\202 given size. + +)BD(ord)ES(\201c\202\240\240\240\240\240\240\240\240\240 Return integer ASCII value of <c> \201str of len 1\202. + +)BD(pow)ES(\201x, y [, z]\202 Return x to power y [modulo z]. See also ** operator. + +)BD(range)ES(\201start [,end [, step]]\202 +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 return list of ints from >= start and < end.\240 +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 With 1 arg, list from 0..<arg>-1 +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 With 2 args, list from <start>..<end>-1 +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 With 3 args, list from <start> up to <end> by <step>)WR( + +)BD(raw_input)ES(\201[prompt]\202 +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 Print prompt if given, then read string from std +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 input \201no trailing \200n\202. + +)BD(reduce)ES(\201f, list [, init]\202 +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 Apply the binary function <f> to the items of +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 <list> so as to reduce the list to a single value. +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 If <init> given, it is "prepended" to <list>. + +)BD(reload)ES(\201module\202\240 Re-parse and re-initialize an already imported module. +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 Useful in interactive mode, if you want to reload a +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 module after fixing it. If module was synactically +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 correct but had an error in initialization, must +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 import it one more time before calling reload\201\202. + +)BD(repr)ES(\201object\202\240\240\240 Return a string containing a printable representation +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 of an object. Equivalent to `object` \201using +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 backquotes\202. + +)BD(round)ES(\201x,n=0\202\240\240\240 Return the floating point value x rounded to n digits +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 after the decimal point. + +)BD(setattr)ES(\201object, name, value\202 +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 This is the counterpart of getattr\201\202. +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 setattr\201o, 'foobar', 3\202 <=> o.foobar = 3 +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 )UN(Create)NU( attribute if it doesn't exist! + +)BD(slice)ES(\201[start,] stop[, step]\202 +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 Return a )I(slice object)ES( representing a range, with R/O)WR( +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 attributes: start, stop, step.)RP( + +) 20 71 PR()BD(str)ES(\201object\202\240\240\240\240 Return a string containing a nicely printable +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 representation of an object. + +)BD(tuple)ES(\201sequence\202 Creates a tuple with same elements as <sequence>. If +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 already a tuple, return itself \201not a copy\202. + +)BD(type)ES(\201obj\202\240\240\240\240\240\240 Return a type object [see module )I(types)ES(]representing the +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 type of <obj>. E.g., import types +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 if type\201x\202 == types.StringType: print 'It is a string' + +)BD(vars)ES(\201[object]\202\240 Without arguments, return a dictionary corresponding +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 to the current local symbol table.\240 With a module, +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 class or class instance object as argument\240\240\240 +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 returns a dictionary corresponding to the object's +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 symbol table. Useful with "%" formatting operator. + +)BD(xrange)ES(\201start [, end [, step]]\202 +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 Like range\201\202, but doesn't actually store entire list +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 all at once. Good to use in "for" loops when there is a +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 big range and little memory.)RP( + +)2 1 1 HR()0 2 42 H()WB 71 Sn()WB 9 Sn()EA(Built-In Exceptions)EH( + +)0 DL()DT()I(Exception)ES( + +)DT(\240\240\240\240\240\240\240\240 Root class for all exceptions + +)DT()I(\240\240\240 SystemExit)ES( + +)DT(\240\240\240\240\240\240\240\240 On 'sys.exit\201\202' + +)DT()I(\240\240\240 StandardError)ES( + +)DT(\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 +Base class for all built-in exceptions; derived from Exception root class. + +)DT()I(\240\240\240\240\240\240\240 ArithmeticError)ES( + +)DT(\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 +Base class for OverflowError, ZeroDivisionError, FloatingPointError + +)DT()I(\240\240\240\240\240\240\240\240\240\240\240 OverflowError)ES( + +)BR(\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 +On excessively large arithmetic operation +)DT()I(\240\240\240\240\240\240\240\240\240\240\240 ZeroDivisionError)ES( + +)DD(\240\240\240\240\240\240\240\240\240 On division or modulo +operation with 0 as 2nd arg + +)DT()I(\240\240\240\240\240\240\240\240\240\240\240 FloatingPointError)ES( + +)DT(\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 +when a floating point operation fails. + +)DT()I(\240)ES( + +)BR()I(\240\240\240\240\240\240\240 AssertionError)ES( +)DT(\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 +When an )I(assert)ES( statement fails. + +)DT()I(\240\240\240\240\240\240\240 AttributeError)ES( + +)BR(\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 +On attribute reference or assignment failure +)DT()I(\240\240\240\240\240\240\240 EOFError)ES( + +)BR(\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 +Immediate end-of-file hit by input\201\202 or raw_input\201\202 +)DT()I(\240\240\240\240\240\240\240 EnvironmentError)ES()-1 Bf add FZ(\240\240\240 +[)BD(new)ES( in 1.5.2])Ef( + +)DT(\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 +On error outside Python; error arg tuple is \201errno, errMsg...\202 + +)DT()I(\240\240\240\240\240\240\240\240\240\240\240 IOError)ES()-1 Bf add FZ(\240\240\240 +[)BD(changed)ES( in 1.5.2])Ef( + +)DD(\240\240\240\240 I/O-related operation failure + +)DT()I(\240\240\240\240\240\240\240\240\240\240\240 OSError)ES()-1 Bf add FZ(\240\240\240 +[)BD(new)ES( in 1.5.2])Ef( + +)DD(\240\240\240\240 used by the )I(os)ES( module's )I(os.error)ES( +exception. + +)DT()I(\240\240\240\240\240\240\240 ImportError)ES( + +)DD(\240\240\240\240 On failure of `import' to find module or name + +)DT()I(\240\240\240\240\240\240\240 KeyboardInterrupt)ES( + +)DD(\240\240\240\240 On user entry of the interrupt key \201often `Control-C'\202 + +)DT()I(\240\240\240\240\240\240\240 LookupError)ES( + +)DT(\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 +base class for IndexError, KeyError + +)DT()I(\240\240\240\240\240\240\240\240\240\240\240 IndexError)ES( + +)DD(\240\240\240\240\240\240\240\240 On out-of-range sequence +subscript + +)DT()I(\240\240\240\240\240\240\240\240\240\240\240 KeyError)ES( + +)DD(\240\240\240\240\240\240\240\240 On reference to a non-existent +mapping \201dict\202 key + +)DT()I(\240\240\240\240\240\240 MemoryError)ES( + +)DD(\240\240\240\240 On recoverable memory exhaustion + +)DT()I(\240\240\240\240\240\240\240 NameError)ES( + +)DD(\240\240\240\240 On failure to find a local or global \201unqualified\202 +name + +)DT()I(\240\240\240\240\240\240\240 RuntimeError)ES( + +)DD(\240\240\240\240 Obsolete catch-all; define a suitable error instead + +)BR(\240\240\240 )I(NotImplementedError)ES()-1 Bf add FZ(\240\240 +[)BD(new)ES( in 1.5.2])Ef( +)DD(\240\240\240\240\240\240\240 On method not implemented + +)DT()I(\240\240\240\240\240\240\240 SyntaxError)ES( + +)DD(\240\240\240\240 On parser encountering a syntax error + +)DT()I(\240\240\240\240\240\240\240 SystemError)ES( + +)DD(\240\240\240\240 On non-fatal interpreter error - bug - report +it + +)DT()I(\240\240\240\240\240\240\240 TypeError)ES( + +)DD(\240\240\240\240 On passing inappropriate type to built-in op or +func + +)DT()I(\240\240\240\240\240\240\240 ValueError)ES( + +)DD(\240\240\240\240 On arg error not covered by TypeError or more +precise)LD( + +)2 1 1 HR()0 2 43 H()WB 72 Sn()WB 10 Sn()EA(Standard methods & operators redefinition +in classes)EH( + +) 6 99 PR(Standard methods & operators map to methods in user-defined classes and thus may be redefined, e.g. +\240\240\240 class x:\240 +\240\240\240\240\240\240\240\240 def __init__\201self, v\202: self.value = v +\240\240\240\240\240\240\240\240 def __add__\201self, r\202: return self.value + r +\240\240\240 a = x\2013\202 # sort of like calling x.__init__\201a, 3\202 +\240\240\240 a + 4\240\240\240 # is equivalent to a.__add__\2014\202)RP( + +)0 3 44 H(Special)WB 73 Sn( methods for any class)EH( +\201s: self, o: other\202 +) 14 76 PR(\240\240\240\240\240\240\240 __init__\201s, args\202 object instantiation\240 + +\240\240\240\240\240\240\240 __del__\201s\202\240\240\240\240\240\240\240 called on object demise \201refcount becomes 0\202 +\240\240\240\240\240\240\240 __repr__\201s\202\240\240\240\240\240\240 repr\201\202 and `...` conversions +\240\240\240\240\240\240\240 __str__\201s\202\240\240\240\240\240\240\240 str\201\202 and 'print' statement +\240\240\240\240\240\240\240 __cmp__\201s, o\202\240\240\240\240 implements <, ==, >, <=, <>, !=, >=, is [not] +\240\240\240\240\240\240\240 __hash__\201s\202\240\240\240\240\240\240 hash\201\202 and dictionary operations +\240\240\240\240\240\240\240 __getattr__\201s, name\202\240 called when attr lookup doesn't find <name> +\240\240\240\240\240\240\240 __setattr__\201s, name, val\202 called when setting an attr +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 \201inside, don't use "self.name = value" +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 use "self.__dict__[name] = val"\202 +\240\240\240\240\240\240\240 __delattr__\201s, name\202\240 called to delete attr <name> + +\240\240\240\240\240\240\240 __call__\201self, *args\202 called when an instance is called as function.)RP( + +)0 3 45 H(Operators)WB 74 Sn()EH( + +)BQ(See list in the )I(operator)ES( module. Operator function names +are provided with 2 variants, with or without +)BR(ading & trailing '__' \201eg. __add__ or add\202. +)0 P()BD(Numeric operations special methods)ES( +)BR(\201s: self, o: other\202)QB( + +) 19 80 PR(\240\240\240\240\240\240\240 s+o\240\240\240\240\240\240 =\240 __add__\201s,o\202\240\240\240\240\240\240\240\240 s-o\240\240\240\240\240\240\240 =\240 __sub__\201s,o\202 +\240\240\240\240\240\240\240 s*o\240\240\240\240\240\240 =\240 __mul__\201s,o\202\240\240\240\240\240\240\240\240 s/o\240\240\240\240\240\240\240 =\240 __div__\201s,o\202 +\240\240\240\240\240\240\240 s%o\240\240\240\240\240\240 =\240 __mod__\201s,o\202\240\240\240\240\240\240\240\240 divmod\201s,o\202 = __divmod__\201s,o\202 +\240\240\240\240\240\240\240 pow\201s,o\202\240 =\240 __pow__\201s,o\202 +\240\240\240\240\240\240\240 s&o\240\240\240\240\240\240 =\240 __and__\201s,o\202\240\240\240\240\240\240\240\240\240 +\240\240\240\240\240\240\240 s^o\240\240\240\240\240\240 =\240 __xor__\201s,o\202\240\240\240\240\240\240\240\240 s|o\240\240\240\240\240\240\240 =\240 __or__\201s,o\202 +\240\240\240\240\240\240\240 s<<o\240\240\240\240\240 =\240 __lshift__\201s,o\202\240\240\240\240\240 s>>o\240\240\240\240\240\240 =\240 __rshift__\201s,o\202 +\240\240\240\240\240\240\240 nonzero\201s\202 = __nonzero__\201s\202 \201used in boolean testing\202 +\240\240\240\240\240\240\240 -s\240\240\240\240\240\240\240 =\240 __neg__\201s\202\240\240\240\240\240\240\240\240\240\240 +s\240\240\240\240\240\240\240\240 =\240 __pos__\201s\202\240\240 +\240\240\240\240\240\240\240 abs\201s\202\240\240\240 =\240 __abs__\201s\202\240\240\240\240\240\240\240\240\240\240 ~s\240\240\240\240\240\240\240\240 =\240 __invert__\201s\202\240 \201bitwise\202 +\240\240\240\240\240\240\240 int\201s\202\240\240\240 =\240 __int__\201s\202\240\240\240\240\240\240\240\240\240\240 long\201s\202\240\240\240 =\240 __long__\201s\202 +\240\240\240\240\240\240\240 float\201s\202\240 =\240 __float__\201s\202 +\240\240\240\240\240\240\240 oct\201s\202\240\240\240 =\240 __oct__\201s\202\240\240\240\240\240\240\240\240\240\240 hex\201s\202\240\240\240\240 =\240 __hex__\201s\202 +\240\240\240\240\240\240\240 coerce\201s,o\202 = __coerce__\201s,o\202 + +\240\240\240\240\240\240\240 Right-hand-side equivalents for all binary operators exist; +\240\240\240\240\240\240\240 are called when class instance is on r-h-s of operator: +\240\240\240\240\240\240\240 a + 3\240 calls __add__\201a, 3\202 +\240\240\240\240\240\240\240 3 + a\240 calls __radd__\201a, 3\202)RP( + +)BQ()BD(All seqs and maps, general operations plus:)ES( +)BR(\201s: self, i: index or key\202)QB( + +) 2 80 PR(\240\240\240\240\240\240\240 len\201s\202\240\240\240 = __len__\201s\202\240\240\240\240\240\240\240 length of object, >= 0.\240 Length 0 == false +\240\240\240\240\240\240\240 s[i]\240\240\240\240\240 = __getitem__\201s,i\202\240 Element at index/key i, origin 0)RP( + +)BQ()BD(Sequences, general methods, plus:)ES( +) 7 63 PR(\240\240\240\240\240\240\240 s[i]=v\240\240\240\240\240\240\240\240\240\240 = __setitem__\201s,i,v\202 +\240\240\240\240\240\240\240 del s[i]\240\240\240\240\240\240\240\240 = __delitem__\201s,i\202 +\240\240\240\240\240\240\240 s[i:j]\240\240\240\240\240\240\240\240\240\240 = __getslice__\201s,i,j\202 +\240\240\240\240\240\240\240 s[i:j]=seq\240\240\240\240\240\240 = __setslice__\201s,i,j,seq\202 +\240\240\240\240\240\240\240 del s[i:j]\240\240\240\240\240\240 = __delslice__\201s,i,j\202\240\240 == s[i:j] = [] +\240\240\240\240\240\240\240 seq * n\240\240\240\240\240\240\240\240\240 = __repeat__\201seq, n\202 +\240\240\240\240\240\240\240 s1 + s2\240\240\240\240\240\240\240\240\240 = __concat__\201s1, s2\202)RP( +)BD(Mappings, general methods, plus)ES( +) 3 77 PR(\240\240\240\240\240\240\240 hash\201s\202\240\240\240\240\240\240\240\240\240 = __hash__\201s\202 - hash value for dictionary references +\240\240\240\240\240\240\240 s[k]=v\240\240\240\240\240\240\240\240\240\240 = __setitem__\201s,k,v\202 +\240\240\240\240\240\240\240 del s[k]\240\240\240\240\240\240\240\240 = __delitem__\201s,k\202)RP()QB( + +)0 2 46 H()WB 75 Sn()WB 11 Sn()EA(Special informative state attributes for some +types:)EH( + +) 85 85 PR(\240\240\240 )BD(Lists & Dictionaries)ES(: +\240\240\240\240\240\240\240 __methods__ \201list, R/O\202: list of method names of the object +\240 +\240\240\240 )BD(Modules)ES(: +\240\240\240\240\240\240\240 __dict__ \201dict, R/O\202: module's name space +\240\240\240\240\240\240\240 __doc__ \201string/None, R/O\202: doc string \201<=> __dict__['__doc__']\202 +\240\240\240\240\240\240\240 __name__\201string, R/O\202: module name \201also in __dict__['__name__']\202 +\240\240\240\240\240\240\240 __file__\201string/undefined, R/O\202: pathname of .pyc, .pyo or .pyd \201undef for +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 modules statically linked to the interpreter\202 +\240\240\240 )BD(Classes)ES(:\240\240\240 [bold: writable since 1.5.2] +\240\240\240\240\240\240\240 __bases__ \201tuple, R/)BD(W\202)ES(: parent classes +\240\240\240\240\240\240\240 __dict__ \201dict, R/)BD(W)ES(\202: attributes \201class name space\202 +\240\240\240\240\240\240\240 __name__\201string, R/)BD(W)ES(\202: class name \201also in __dict__['__name__']\202 +\240\240\240\240\240\240\240 __doc__ \201string/None, R/W\202: doc string \201<=> __dict__['__doc__']\202 +\240 +\240\240\240 )BD(Instances:)ES(\240\240\240\240\240\240\240 __class__ \201class, R/W\202: instance's class +\240\240\240\240\240\240\240 __dict__ \201dict, R/W\202: attributes + + +\240\240\240 )BD(User-defined functions)ES(: [bold: writable since 1.5.2] +\240\240\240\240\240\240\240 __doc__ \201string/None, R/)BD(W)ES(\202: doc string +\240\240\240\240\240\240\240 __name__\201string, R/O\202: function name +\240\240\240\240\240\240\240 func_defaults \201tuple/None, R/)BD(W)ES(\202: default args values if any +\240\240\240\240\240\240\240 func_code \201code, R/)BD(W)ES(\202: code object representing the compiled function body +\240\240\240\240\240\240\240 func_globals \201dict, R/O\202: ref to dictionary of func global variables +\240\240\240\240\240\240\240 func_doc \201R/)BD(W)ES(\202: same as __doc__ +\240 +\240\240\240 )BD(User-defined Methods)ES(: +\240\240\240\240\240\240\240 im_self \201instance/None, R/O\202: target instance object \201None if unbound\202 +\240\240\240\240\240\240\240 im_func \201function, R/O\202: function object +\240\240\240\240\240\240\240 im_class \201class, R/O\202: class defining the method \201may be a base class\202)WR( +\240\240\240\240\240\240\240 __doc__ \201string/None, R/O\202: doc string +\240\240\240\240\240\240\240 __name__\201string, R/O\202: method name \201same as im_func.__name__\202 + +\240\240\240 )BD(Built-in Functions & methods)ES(: +\240\240\240\240\240\240\240 __doc__ \201string/None, R/O\202: doc string +\240\240\240\240\240\240\240 __name__ \201string, R/O\202: function name +\240\240\240\240\240\240\240 __self__ : [methods only] target object +\240\240\240\240\240\240\240 __members__ = list of attr names: ['__doc__','__name__','__self__']\202 + +\240\240\240 )BD(Codes)ES(: +\240\240\240\240\240\240\240 co_argcount \201int, R/0\202: number of positional args +\240\240\240\240\240\240\240 co_nlocals \201int, R/O\202: number of local vars \201including args\202 +\240\240\240\240\240\240\240 co_varnames \201tuple, R/O\202: names of local vars \201starting with args\202 +\240\240\240\240\240\240\240 co_code \201string, R/O\202: sequence of bytecode instructions +\240\240\240\240\240\240\240 co_consts \201tuple, R/O\202: litterals used by the bytecode, 1st one is +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 fct doc \201or None\202 +\240\240\240\240\240\240\240 co_name \201string, R/O\202: name of function +\240\240\240\240\240\240\240 co_names \201tuple, R/O\202: names used by the bytecode +\240\240\240\240\240\240\240 co_filename \201string, R/O\202: filename from which the code was compiled +\240\240\240\240\240\240\240 co_flags \201int, R/O\202: flags for the interpreter +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 bit 2 set if fct uses "*arg" syntax +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 bit 3 set if fct uses '**keywords' syntax +\240\240\240\240\240\240\240\240\240\240 HINT: use codehack.getlineno\201\202 to get 1st lineNo of a code object + +\240\240\240 )BD(Frames)ES(: +\240\240\240\240\240\240\240 f_back \201frame/None, R/O\202: previous stack frame \201towards the caller\202 +\240\240\240\240\240\240\240 f_code \201code, R/O\202: code object being executed in this frame +\240\240\240\240\240\240\240 f_locals \201dict, R/O\202: local vars +\240\240\240\240\240\240\240 f_globals \201dict, R/O\202: global vars +\240\240\240\240\240\240\240 f_builtins \201dict, R/O\202: built-in \201intrinsic\202 names)WR( +\240\240\240\240\240\240\240 f_restricted \201int, R/O\202: flag indicating whether fct is executed in +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 restricted mode +\240\240\240\240\240\240\240 f_lineno \201int, R/O\202: current line number +\240\240\240\240\240\240\240 f_lasti \201int, R/O\202: precise instruction \201index into bytecode\202 +\240\240\240\240\240\240\240 f_trace \201function/None, R/W\202: debug hook called at start of each source line + +\240\240\240 )BD(Tracebacks)ES(: +\240\240\240\240\240\240\240 tb_next \201frame/None, R/O\202: next level in stack trace \201towards the frame where +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 the exception occurred\202 +\240\240\240\240\240\240\240 tb_frame \201frame, R/O\202: execution frame of the current level +\240\240\240\240\240\240\240 tb_lineno \201int, R/O\202: line number where the exception occured +\240\240\240\240\240\240\240 tb_lasti \201int, R/O\202: precise instruction \201index into bytecode\202 +\240 +\240\240\240 )BD(Slices)ES(: +\240\240\240\240\240\240\240 start \201any/None, R/O\202: lowerbound +\240\240\240\240\240\240\240 stop \201any/None, R/O\202: upperbound +\240\240\240\240\240\240\240 step \201any/None, R/O\202: step value +\240 +\240\240\240 )BD(Complex numbers)ES(: +\240\240\240\240\240\240\240 real \201float, R/O\202: real part +\240\240\240\240\240\240\240 imag \201float, R/O\202: imaginary part + +)BD(\240\240\240 XRanges)ES(: +\240\240\240\240\240\240\240 tolist \201Built-in method, R/O\202: ?)RP( + +)2 1 1 HR()0 2 47 H()WB 76 Sn()WB 12 Sn()EA(Important Modules)EH( + +)2 Al()WB 13 Sn()EA()BD()I()+2 Bf add FZ(sys)Ef()ES()ES()Ea( +)BD(Some variables:)ES( +) 20 72 PR(argv\240\240\240\240\240\240\240\240\240\240\240 -- The list of command line arguments passed to a\240 +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 Python script. sys.argv[0] is the script name. +builtin_module_names +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 -- A list of strings giving the names of all modules +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 written in C that are linked into this interpreter. + +check_interval\240 -- How often to check for thread switches or signals\240 +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 \201measured in number of virtual machine instructions\202 +exc_type +exc_value +exc_traceback\240\240 -- )BD(Deprecated)ES( since release 1.5. Use exc_info\201\202 instead. +\240 +exitfunc\240\240\240\240\240\240\240 -- User can set to a parameterless fcn. It will get +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 called before interpreter exits. +last_type +last_value +last_traceback\240 -- Set only when an exception not handled and +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 interpreter prints an error. Used by debuggers. + +maxint\240\240\240\240\240\240\240\240\240 -- maximum positive value for integers)RP( + +) 18 75 PR(modules\240\240\240\240\240\240\240\240 -- Dictionary of modules that have already been loaded. + +path\240\240\240\240\240\240\240\240\240\240\240 -- Search path for external modules. Can be modified +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 by program. +platform\240\240\240\240\240\240\240 -- The current platform, e.g. "sunos5", "win32" +ps1 +ps2\240\240\240\240\240\240\240\240\240\240\240\240 -- prompts to use in interactive mode. + +stdin +stdout +stderr\240\240\240\240\240\240\240\240\240 -- File objects used for I/O. User can redirect by +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 assigning a new file object to them \201or any object: +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 .with a method write\201string\202 for stdout/stderr, +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 .with a method readline\201\202 for stdin\202 + +version\240\240\240\240\240\240\240\240 -- string containing version info about Python interpreter. + +\201and also: copyright, dllhandle, exec_prefix, prefix\202)RP( +)BD(Functions:)ES( +) 17 88 PR(exit\201n\202\240\240\240\240\240\240\240\240 -- Exit with status <n>. Raises SystemExit exception. +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 \201Hence can be caught and ignored by program\202 +getrefcount\201object\202\240 +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 -- Return the reference count of the object. Generally 1 higher +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 than you might expect, because of <object> arg temp reference. +setcheckinterval\201interval\202\240 +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 -- Set the interpreter's thread switching interval \201in number of virtual +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 code instructions, default:10\202. +settrace\201func\202\240 -- Sets a trace function: called before each line of\240 +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 code is exited. +setprofile\201func\202 +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 -- Sets a profile function for performance profiling. +exc_info\201\202\240\240\240\240\240 -- info on exception currently being handled; this is a +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 tuple \201exc_type, exc_value, exc_traceback\202. +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 )BD(Warning)ES(: assigning the traceback return value to a local +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 variable in a function handling an exception will cause +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 a circular reference.)RP( + +)2 1 1 HR()2 Al()WB 14 Sn()EA()BD()I()+2 Bf add FZ(os)Ef()ES()ES()Ea( +"synonym" for whatever O/S-specific module is proper for current environment. +Uses "posix" whenever possible. +)0 P()BD(Variables)ES( +)BR(name\240\240\240\240\240\240\240\240\240 -- name +of O/S-specific module \201e.g. "posix", "mac", "nt"\202 +)BR(path\240\240\240\240\240\240\240\240\240\240\240 +-- O/S-specific module for path manipulations. +)BR(\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 +on Unix, os.path.split\201\202 <=> posixpath.split\201\202 +)BR(curdir\240\240\240\240\240\240\240\240 -- string used +to represent current directory \201'.'\202 +)BR(pardir\240\240\240\240\240\240\240\240 -- string used +to represent parent directory \201'..'\202 +)BR(sep\240\240\240\240\240\240\240\240\240\240\240\240 +-- string used to separate directories \201'/' or '\200'\202 +)BR(pathsep\240\240\240\240\240 -- character used to separate +search path components \201as in $PATH\202, eg. ';' for windows. +)BR(linesep\240\240\240\240\240\240\240 -- [1.5.2] line separator +as used in )BD(binary)ES( files, ie '\200n' on Unix, '\200r\200n' on Dos/Win, '\200r' +on Mac +)0 P()BD(Functions)ES( +)BR(makedirs\201path[, mode=0777]\202)-1 Bf add FZ(\240\240\240\240\240\240\240 +[)BD(new)ES( in 1.5.2])Ef( +)BR(\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 +-- Recursive directory creation \201create required intermediary dirs\202; os.error +if fails. +)BR(removedirs\201path\202)-1 Bf add FZ(\240\240\240\240\240\240\240 +[)BD(new)ES( in 1.5.2])Ef( +)BR(\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 +-- Recursive directory creation \201create required intermediary dirs\202; os.error +if fails. +)BR(renames\201old, new\202)-1 Bf add FZ(\240\240\240\240\240\240\240 +[)BD(new)ES( in 1.5.2])Ef( +)BR(\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 +-- Recursive directory or file renaming; os.error if fails. +)0 P()2 1 1 HR()2 Al()WB 15 Sn()EA()BD()I()+2 Bf add FZ(posix)Ef()ES()ES()Ea( +don't import this module directly, import )I(os)ES( instead ! +)0 P()BD(Variables:)ES( +) 7 103 PR(environ\240\240\240\240\240\240\240\240 -- dictionary of environment variables, e.g. +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 posix.environ['HOME']. [Windows: before release 1.52 case is significant; from 1.52, +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 os.environ is all uppercase but accesses are case insensitive] + +error\240\240\240\240\240\240\240\240\240\240 -- exception raised on POSIX-related error.\240 +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 Corresponding value is tuple of errno code and +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 perror\201\202 string.)RP( +)BD(Some Functions \201see doc for more\202:)ES( +) 50 91 PR(chdir\201path\202\240\240\240\240 -- change current directory to <path>. +chmod\201path, mode\202 +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 -- change the mode of <path> to the numeric <mode> +close\201fd\202\240\240\240\240\240\240 -- Close file descriptor <fd> opened with posix.open. +_exit\201n\202\240\240\240\240\240\240\240 -- Immediate exit, with no cleanups, no SystemExit, +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 etc. Should use this to exit a child process. +execv\201p, args\202\240 -- "Become" executable <p> with args <args> +getcwd\201\202\240\240\240\240\240\240\240 -- return a string representing the current working directory +getpid\201\202\240\240\240\240\240\240\240 -- return the current process id +fork\201\202\240\240\240\240\240\240\240\240\240 -- Like C's fork\201\202. Returns 0 to child, child pid to parent. +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 [Not on Windows] +kill\201pid, signal\202 +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 -- Like C's kill [Not on Windows] +listdir\201path\202\240\240 -- List names of entries in directory <path>. +lseek\201fd, pos, how\202 +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 -- set current position in file <fd> to position <pos>, expressed +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 as an offset relative to beginning of file \201how=0\202, to +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 current position \201how=1\202, or to end of file \201how=2\202 +mkdir\201path[, mode]\202 +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 -- Creates a directory named <path> with numeric <mode> +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 \201default 0777\202 +open\201file, flags, mode\202 +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 -- Like C's open\201\202. Returns file descriptor. Use file object fcts +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 rather than this low level ones. +pipe\201\202\240\240\240\240\240\240\240\240\240 -- Creates pipe. Returns pair of file descriptors \201r, w\202 [Not on Windows]. +popen\201command, mode='r', buffSize=0\202 +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 -- Open a pipe to or from <command>. Result is a file +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 object to read to or write from, as indicated by +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 <mode> being 'r' or 'w'. +remove\201path\202\240\240\240 -- see unlink. +rename\201src, dst\202-- Rename/move the file or directory <src> to <dst>. [error if)WR( +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 target name already exists] +rmdir\201path\202\240\240\240\240 -- Remove the directory <path> +read\201fd, n\202\240\240\240\240 -- Read <n> bytes from <fd> and return as string. +stat\201path\202\240\240\240\240\240 -- Returns st_mode, st_ino, st_dev, st_nlink, st_uid, +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 st_gid, st_size, st_atime, st_mtime, st_ctime. +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 [st_ino, st_uid, st_gid are dummy on Windows]\240 +system\201command\202 -- Execute string <command> in a subshell. Returns exit +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 status of subshell. +times\201\202\240\240\240\240\240\240\240\240 -- return accumulated CPU times in sec \201user, system, children's user, +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 children's sys, elapsed real time\202. [3 last not on Windows] +unlink\201path\202\240\240\240 -- Unlink \201"delete"\202 path/file. same as: remove +utime\201path, \201aTime, mTime\202\202 +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 -- Set the access & modified time of the file to the given tuple of values. +wait\201\202\240\240\240\240\240\240\240\240\240 -- Wait for child process completion. Returns tuple of +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 pid, exit_status [Not on Windows] +waitpid\201pid, options\202 +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 -- Wait for process pid to complete. Returns tuple of +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 pid, exit_status [Not on Windows] +write\201fd, str\202\240 -- Write <str> to <fd>. Returns num bytes written.)RP( + +)2 1 1 HR()2 Al()WB 16 Sn()EA()BD()I()+2 Bf add FZ(posixpath)Ef()ES()ES()Ea( +Do not import this module directly, import )I(os)ES( instead and refer +to this module as os.path. \201e.g. os.path.exists\201p\202\202 ! +)0 P()BD(Some Functions \201see doc for more\202:)ES( +) 29 138 PR(exists\201p\202\240\240\240\240\240\240 -- True if string <p> is an existing path +expanduser\201p\202\240\240 -- Returns string that is \201a copy of\202 <p> with "~" expansion done. +expandvars\201p\202\240\240 -- Returns string that is \201a copy of\202 <p> with environment vars expanded. +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 [Windows: case significant; Use Unix: )BD($)ES(var notation,not %var%] +getsize\201filename\202)-1 Bf add FZ(\240\240\240\240\240\240\240 [)BD(new)ES( in 1.5.2])Ef(\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 -- return the size in bytes of <filename>. raise os.error. +getmtime\201filename\202\240)-1 Bf add FZ(\240\240\240\240\240 [)BD(new)ES( in 1.5.2])Ef(\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 -- return last modification time of <filename> \201integer nb of seconds since epoch\202. +getatime\201filename\202\240)-1 Bf add FZ(\240\240\240\240\240 [)BD(new)ES( in 1.5.2])Ef(\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 -- return last access time of <filename> \201integer nb of seconds since epoch\202. +isabs\201p\202\240\240\240\240\240\240\240 -- True if string <p> is an absolute path. +isdir\201p\202\240\240\240\240\240\240\240 -- True if string <p> is a directory. +islink\201p\202\240\240\240\240\240\240 -- True if string <p> is a symbolic link. +ismount\201p\202\240\240\240\240\240 -- True if string <p> is a mount point [true for all dirs on Windows]. +join\201p[,q[,...]]\202 +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 -- Joins one or more path components intelligently. +split\201p\202\240\240\240\240\240\240\240 -- Splits into \201head, tail\202 where <tail> is last +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 pathname component and <head> is everything leading +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 up to that. <=> \201dirname\201p\202, basename\201p\202\202 +splitdrive\201p\202\240\240 -- Splits path in a pair \201'drive:', tail\202 [on Windows] +splitext\201p\202\240\240\240\240 -- Splits into \201root, ext\202 where last comp of <root> +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 contains no periods and <ext> is empty or starts +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 with a period. +walk\201p, visit, arg\202 +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 -- Calls the function <visit> with arguments +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 \201<arg>, <dirname>, <names>\202 for each directory recursively in +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 the directory tree rooted at <p> \201including p itself if it's a dir\202 +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 The argument <dirname> specifies the visited directory, the argument +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 <names> lists the files in the directory.\240 The <visit> function may +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 modify <names> to influence the set of directories visited below +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 <dirname>, e.g., to avoid visiting certain parts of the tree. +[1.52, NT version: samefile\201\202, sameopenfile\201\202, samestat\201\202 deprecated because not reliable])RP( + +)2 Al( +)2 0.6 1 HR()WB 17 Sn()EA()BD()I()+2 Bf add FZ(time)Ef()ES()ES()Ea( + +)0 P()BD(Variables)ES( +) 2 87 PR(altzone\240\240\240\240\240\240\240 -- signed\240 offset of local DST timezone in sec west of the 0th meridian. +daylight\240\240\240\240\240\240 -- nonzero if a DST timezone is specified)RP( +)BD(Functions)ES( +) 11 137 PR(time\201\202\240\240\240\240\240\240\240\240 -- return a float representing UTC time in seconds since the epoch. +gmtime\201secs\202, localtime\201secs\202 +\240\240\240\240\240\240\240\240\240\240\240\240\240\240 -- return a tuple representing time : \201year aaaa, month\2011-12\202, +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 day\2011-31\202, hour\2010-23\202, minute\2010-59\202, second\2010-59\202, weekday +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 \2010-6, 0 is monday\202, Julian day\2011-366\202, daylight flag\201-1,0 or 1\202\202 +asctime\201timeTuple\202, +strftime\201format, timeTuple\202 +\240\240\240\240\240\240\240\240\240\240\240\240\240\240 -- return a formated string representing time. +mktime\201tuple\202\240 -- inverse of localtime\201\202. Return a float. +strptime\201string[, format]\202\240\240\240\240\240\240\240)-1 Bf add FZ( [)BD(new)ES( in 1.5.2])Ef(\240\240\240\240\240\240\240\240\240\240\240\240\240\240 -- parse a formated string representing time, return tuple as in gmtime\201\202. +sleep\201secs\202\240\240\240 -- Suspend execution for <secs> seconds. <secs> can be a float.)RP( + +) 1 23 PR(and also: clock, ctime.)RP( + +)2 1 1 HR()2 Al()WB 18 Sn()EA()BD()I()+2 Bf add FZ(string)Ef()ES()ES()Ea( + +)0 P()BD(Some Variables:)ES( +) 8 75 PR(digits\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 -- The string '0123456789' +hexdigits, octdigits\240\240\240 -- legal hexadecimal & octal digits +letters +uppercase +lowercase +whitespace +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 -- Strings containing the appropriate characters +index_error\240\240\240\240\240\240\240\240\240\240\240\240 -- Exception raised by index\201\202 if substr not found.)RP( + +) 22 89 PR()BD(Some Functions:)ES(\240 +expandtabs\201s, tabSize\202\240 -- returns a copy of string <s> with tabs expanded. +find/rfind\201s, sub[, start=0[, end=0]\202 +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 -- Return the lowest/highest index in <s> where the substring +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 <sub> is found such that <sub> is wholly contained in +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 s[start:end]. Return -1 if <sub> not found. +ljust/rjust/center\201s, width\202 +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 -- Return a copy of string <s> left/right justified/centerd in a +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 field of given width, padded with spaces. <s> is never +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 truncated. +lower/upper\201s\202\240\240\240\240\240\240\240\240\240 -- Return a string that is \201a copy of\202 <s> in lowercase/uppercase +split\201s[, sep=whitespace[, maxsplit=0]]\202 +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 -- Return a list containing the words of the string <s>, +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 using the string <sep> as a separator. +join\201words[, sep=' ']\202\240 -- Concatenate a list or tuple of words with intervening +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 separators; inverse of split. +replace\201s, old, new[, maxsplit=0] +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 -- Returns a copy of string <s> with all occurences of substring +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 <old> replaced by <new>. Limits to <maxsplit> first +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 substitutions if specified. +strip\201s\202\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 -- Return a string that is \201a copy of\202 <s> without leading +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 and trailing whitespace. see also lstrip, rstrip.)RP( + +)2 1 1 HR()2 Al()WB 19 Sn()EA()BD()I()+2 Bf add FZ(re)Ef()ES()ES()Ea( +Patterns are specified as strings. Tip: Use raw strings \201e.g. r'\200w*'\202 to +litteralize backslashes. +)0 P()BD(Regular Expression Syntax:)ES( +) 29 78 PR(.\240\240\240\240\240\240 matches any character \201including newline if DOTALL flag specified\202 +^\240\240\240\240\240\240 matches start of the string \201of every line in MULTILINE mode\202 +$\240\240\240\240\240\240 matches end of the string \201of every line in MULTILINE mode\202 +*\240\240\240\240\240\240 0 or more of preceding regular expression \201as )BD(many)ES( as possible\202 ++\240\240\240\240\240\240 1 or more of preceding regular expression \201as )BD(many)ES( as possible\202 +?\240\240\240\240\240\240 0 or 1 occurence of preceding regular expression +*?, +?, ?? Same as\240 *, + and ? but matches as )BD(few)ES( characters as possible +{m,n}\240\240 matches from m to n repetitions of preceding RE +{m,n}?\240 idem, attempting to match as )BD(few)ES( repetitions as possible +[ ]\240\240\240\240 defines character set: e.g. '[a-zA-Z]' to match all letters +\240\240\240\240\240\240\240 \201see also \200w \200S\202 +[^ ]\240\240\240 defines complemented character set: matches if char is NOT in set +\200\240\240\240\240\240\240 escapes special chars '*?+&$|\201\202' and introduces special sequences +\240\240\240\240\240\240\240 \201see below\202. Due to Python string rules, write as '\200\200' or +\240\240\240\240\240\240\240 r'\200' in the pattern string. +\200\200\240\240\240\240\240 matches a litteral '\200'; due to Python string rules, write as '\200\200\200\200' +\240\240\240\240\240\240\240 in pattern string, or better using raw string: r'\200\200'. +|\240\240\240\240\240\240 specifies alternative: 'foo|bar' matches 'foo' or 'bar' +\201...\202\240\240 matches any RE inside \201\202, and delimits a )I(group)ES(. +\201?:...\202 idem but does'nt delimit a )I(group)ES(. +\201?=...\202 matches if ... matches next, but doesn't consume any of the string +\240\240\240\240\240\240\240 e.g. 'Isaac \201?=Asimov\202' matches 'Isaac' only if followed by 'Asimov'. +\201?!...\202 matches if ... )BD(doesn't)ES( match next. Negative of \201?=...\202 +\201?P<)I(name)ES(>...\202 matches any RE inside \201\202, and delimits a )BD(named)ES( )I(group)ES(. +\240\240\240\240\240\240\240\240\240\240\240\240\240 \201e.g. r'\201?P<id>[a-zA-Z_]\200w*\202' defines a group named )I(id)ES(\202 +\201?P=)I(name)ES(\202 matches whatever text was matched by the earlier group named )I(name)ES(. +\201?#...\202 A comment; ignored. +\201?)I(letter)ES(\202 )I(letter)ES( is one of 'i','L', 'm', 's', 'x'. Set the corresponding flags +\240\240\240\240\240\240\240 \201re.I, re.L, re.M, re.S, re.X\202 for the entire RE.)RP( + +) 13 77 PR(\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 )UN(SPECIAL SEQUENCES)NU(: +\200)I(number)ES( matches content of the )I(group)ES( of the same number; groups are numbered +\240\240\240\240\240\240\240 starting from 1 +\200A\240\240\240\240\240 matches only at the start of the string +\200b\240\240\240\240\240 empty str at beg or end of )I(word)ES(: '\200bis\200b' matches 'is', but not 'his' +\200B\240\240\240\240\240 empty str NOT at beginning or end of word +\200d\240\240\240\240\240 any decimal digit \201<=> [0-9]\202 +\200D\240\240\240\240\240 any non-decimal digit char \201<=> [^O-9]\202 +\200s\240\240\240\240\240 any whitespace char \201<=> [ \200t\200n\200r\200f\200v]\202 +\200S\240\240\240\240\240 any non-whitespace char \201<=> [^ \200t\200n\200r\200f\200v]\202 +\200w\240\240\240\240\240 any alphaNumeric char \201depends on LOCALE flag\202 +\200W\240\240\240\240\240 any non-alphaNumeric char \201depends on LOCALE flag\202 +\200Z\240\240\240\240\240 matches only at the end of the string)RP( +)BD(Variables:)ES( +) 1 70 PR(error\240\240\240\240\240\240\240\240\240\240 -- Exception when pattern string isn't a valid regexp.)RP( +)BD(Functions:)ES( +) 10 84 PR()WB 20 Sn()EA(compile\201pattern[, flags=0]\202 +\240\240\240\240\240\240\240\240\240\240\240 -- Compile a RE pattern string into a )I()0 21 1 A(regular expression object)21 0 TN TL()Ec /AF f D()ES(. +\240\240\240\240\240\240\240\240\240\240\240\240\240\240 Flags \201combinable by |\202: +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 I or IGNORECASE or \201?i\202:\240\240 case insensitive matching +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 L or LOCALE or \201?L\202:\240\240\240 make \200w, \200W, \200b, \200B dependent on the +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 current locale +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 M or MULTILINE or \201?m\202: matches every new line and not only +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 start/end of the whole string +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 S or DOTALL or \201?s\202:\240\240\240 '.' matches ALL chars, including newline +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 X or VERBOSE or \201?x\202)RP( + +) 20 142 PR(escape\201string\202\240\240\240 -- return \201a copy of\202 string with all non-alphanumerics backslashed. +match\201pattern, string[, flags]\202 +\240\240\240\240\240\240\240\240\240 -- if 0 or more chars at )BD(beginning)ES( of <string> match the RE pattern string, +\240\240\240\240\240\240\240\240\240\240\240\240 return a corresponding )I()0 22 1 A(MatchObject)22 0 TN TL()Ec /AF f D()ES( instance, or None if no match. +search\201pattern, string[, flags]\202 +\240\240\240\240\240\240\240\240\240 --scan thru <string> for a location matching <pattern>, return a +\240\240\240\240\240\240\240\240\240\240\240 corresponding )I()0 22 1 A(MatchObject)22 0 TN TL()Ec /AF f D()ES( instance, or None if no match. +split\201pattern, string[, maxsplit=0]\202 +\240\240\240\240\240\240\240\240\240 --split <string> by occurrences of <pattern>. If capturing \201\202 are used in +\240\240\240\240\240\240\240\240\240\240\240 pattern, then occurrences of patterns or subpatterns are also returned. +findall\201pattern, string\202\240 [)BD(new)ES( in 1.5.2] +\240\240\240\240\240\240\240\240\240 --return a list of non-overlapping matches in <pattern>, either a list of +\240\240\240\240\240\240\240\240\240\240\240 groups or a list of tuples if the pattern has more than 1 group. +sub\201pattern, repl, string[, count=0]\202 +\240\240\240\240\240\240\240\240\240 --return string obtained by replacing the \201<count> first\202 lefmost non- +\240\240\240\240\240\240\240\240\240\240\240 overlapping occurrences of <pattern> \201a string or a RE object\202 in <string> +\240\240\240\240\240\240\240\240\240\240\240 by <repl>; <repl> can be a string or a fct called with a single )I()0 22 1 A(MatchObj)22 0 TN TL()Ec /AF f D()ES(\240\240\240\240\240\240\240\240\240\240\240 arg, which must return the replacement string. +subn\201pattern, repl, string[, count=0]\202 + +\240\240\240\240\240\240\240\240\240 --same as sub\201\202, but returns a tuple \201newString, numberOfSubsMade\202)RP( +)WB 21 Sn()EA()BD(Regular Expression Objects)ES( +)BR(\201RE objects are returned by the )0 20 1 A(compile)20 0 TN TL()Ec /AF f D( fct\202 +)0 P()BD(Attributes:)ES( +) 3 78 PR(flags\240\240\240\240\240\240\240 -- flags arg used when RE obj was compiled, or 0 if none provided +groupindex\240\240 -- dictionary of {group name: group number} in pattern +pattern\240\240\240\240\240 -- pattern string from which RE obj was compiled)RP( +)BD(Methods:)ES( +) 6 58 PR(match\201string[, pos][, endpos]\202 +search\201string[, pos][, endpos]\202 +split\201string[, maxsplit=0]\202 +findall\201string\202\240\240\240 [)BD(new)ES( in 1.5.2] +sub\201repl, string[, count=0]\202 +subn\201repl, string[, count=0]\202 -- see equivalent functions.)RP( +)WB 22 Sn()EA()BD(Match Objects)ES( +)BR(\201Match objects are returned by the match & search functions\202 +)0 P()BD(Attributes:)ES( +) 6 81 PR(pos\240\240\240\240\240\240\240 -- value of pos passed to search or match functions; index into +\240\240\240\240\240\240\240\240\240\240\240\240\240 string at which RE engine started search. +endpos\240\240\240\240 -- value of endpos passed to search or match functions; index into +\240\240\240\240\240\240\240\240\240\240\240\240\240 string beyond which RE engine won't go. +re\240\240\240\240\240\240\240\240 -- RE object whose match or search fct produced this MatchObj instance +string\240\240\240\240 -- string passed to match\201\202 or search\201\202)RP( +)BD(Methods:)ES( +) 14 88 PR(group\201[g1, g2, ...]\202 +\240\240\240\240\240\240\240\240\240\240\240\240 -- returns one or more groups of the match. If )BD(one)ES( arg, result is a string; +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 if multiple args, result is a tuple with one item per arg. If )I(gi)ES( is 0, +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 return value is entire matching string; if 1 <= )I(gi)ES( <= 99, return +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 string matching group #)I(gi)ES( \201or None if no such group\202; )I(gi)ES( may also be +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 a group )I(name)ES(. +groups\201\202\240\240\240\240 -- returns a tuple of all groups of the match; groups not participating +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 to the match have a value of None. Returns a string instead of tuple +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 if len\201tuple\202=1 +start\201group\202 +end\201group\202\240\240 -- returns indices of start & end of substring matched by group \201or None +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 if group exists but doesn't contribute to the match\202 +span\201group\202\240 -- returns the 2-tuple \201start\201group\202, end\201group\202\202; can be \201None, None\202 +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 if group didn't contibute to the match.)RP( + +)2 1 1 HR()2 Al()WB 23 Sn()EA()BD()I()+2 Bf add FZ(math)Ef()ES()ES()Ea( + +)0 P()BD(Variables:)ES( +) 2 2 PR(pi +e)RP( +)BD(Functions \201see ordinary C man pages for info\202:)ES( +) 22 57 PR(acos\201x\202 +asin\201x\202 +atan\201x\202 +atan2\201x, y\202 +ceil\201x\202 +cos\201x\202 +cosh\201x\202 +exp\201x\202 +fabs\201x\202 +floor\201x\202 +fmod\201x, y\202 +frexp\201x\202\240\240\240\240\240\240\240 -- Unlike C: \201float, int\202 = frexp\201float\202 +ldexp\201x, y\202 +log\201x\202 +log10\201x\202 +modf\201x\202\240\240\240\240\240\240\240\240 -- Unlike C: \201float, float\202 = modf\201float\202 +pow\201x, y\202 +sin\201x\202 +sinh\201x\202 +sqrt\201x\202 +tan\201x\202 +tanh\201x\202)RP( + +)2 1 1 HR()2 Al()WB 24 Sn()EA()BD()I()+2 Bf add FZ(getopt)Ef()ES()ES()Ea( + +)0 P()BD(Functions:)ES( +) 9 68 PR(getopt\201list, optstr\202\240\240\240 -- Similar to C. <optstr> is option +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 letters to look for. Put ':' after letter +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 if option takes arg. E.g. +\240\240\240 # invocation was "python test.py -c hi -a arg1 arg2" +\240\240\240\240\240\240 opts, args =\240 getopt.getopt\201sys.argv[1:], 'ab:c:'\202\240\240\240 +\240\240\240 # opts would be +\240\240\240\240\240\240 [\201'-c', 'hi'\202, \201'-a', ''\202] +\240\240\240 # args would be +\240\240\240\240\240\240 ['arg1', 'arg2'])RP( + +) 0 0 PR()2 1 1 HR()RP( + +)0 2 48 H()WB 77 Sn()WB 25 Sn()EA(List of modules in base distribution)EH( + +)0 3 49 H(Contents)WB 78 Sn( of Lib directory)BR()-1 Bf add FZ(\201Python 1.52 NT distribution, may be slightly different in +other distributions\202)Ef()EH( + +) 145 89 PR(aifc\240\240\240\240\240\240\240\240\240\240\240 --\240 Stuff to parse AIFF-C and AIFF files. +anydbm\240\240\240\240\240\240\240\240\240 --\240 Generic interface to all dbm clones. \201dbhash, gdbm, dbm,dumbdbm\202 +asynchat\240\240\240\240\240\240\240 --\240 Support for 'chat' style protocols +asyncore\240\240\240\240\240\240\240 --\240 Asynchronous File I/O \201in )I(select)ES( style\202 +audiodev\240\240\240\240\240\240\240 --\240 Audio support for a few platforms. +base64\240\240\240\240\240\240\240\240\240 --\240 Conversions to/from base64 RFC-MIME transport encoding . +BaseHTTPServer\240 --\240 Base class forhttp services. +Bastion\240\240\240\240\240\240\240\240 --\240 "Bastionification" utility \201control access to instance vars\202 +bdb\240\240\240\240\240\240\240\240\240\240\240\240 --\240 A generic Python debugger base class. +binhex\240\240\240\240\240\240\240\240\240 --\240 Macintosh binhex compression/decompression. +bisect\240\240\240\240\240\240\240\240\240 --\240 List bisection algorithms. +calendar\240\240\240\240\240\240\240 --\240 Calendar printing functions. +cgi\240\240\240\240\240\240\240\240\240\240\240\240 --\240 Wraps the WWW Forms Common Gateway Interface \201CGI\202. +CGIHTTPServer\240\240 --\240 CGI http services. +cmd\240\240\240\240\240\240\240\240\240\240\240\240 --\240 A generic class to build line-oriented command interpreters. +cmp\240\240\240\240\240\240\240\240\240\240\240\240 --\240 Efficiently compare files, boolean outcome only. +cmpcache\240\240\240\240\240\240\240 --\240 Same, but caches 'stat' results for speed. +code\240\240\240\240\240\240\240\240\240\240\240 --\240 Utilities needed to emulate Python's interactive interpreter +colorsys\240\240\240\240\240\240\240 --\240 Conversion functions between RGB and other color systems. +commands\240\240\240\240\240\240\240 --\240 Tools for executing UNIX commands . +compileall\240\240\240\240\240 --\240 Force "compilation" of all .py files in a directory. +ConfigParser\240\240\240 --\240 Configuration file parser \201much like windows .ini files\202 +copy\240\240\240\240\240\240\240\240\240\240\240 --\240 Generic shallow and deep copying operations. +copy_reg\240\240\240\240\240\240\240 --\240 Helper to provide extensibility for pickle/cPickle. +dbhash\240\240\240\240\240\240\240\240\240 --\240 \201g\202dbm-compatible interface to bsdhash.hashopen. +dircache\240\240\240\240\240\240\240 --\240 Sorted list of files in a dir, using a cache. +dircmp\240\240\240\240\240\240\240\240\240 --\240 Defines a class to build directory diff tools on. +dis\240\240\240\240\240\240\240\240\240\240\240\240 --\240 Bytecode disassembler. +dospath\240\240\240\240\240\240\240\240 --\240 Common operations on DOS pathnames. +dumbdbm\240\240\240\240\240\240\240\240 --\240 A dumb and slow but simple dbm clone. +dump\240\240\240\240\240\240\240\240\240\240\240 --\240 Print python code that reconstructs a variable.)WR( +exceptions\240\240\240\240\240 --\240 Class based built-in exception hierarchy. +fileinput\240\240\240\240\240\240 --\240 Helper class to quickly write a loop over all standard input files. +find\240\240\240\240\240\240\240\240\240\240\240 --\240 Find files directory hierarchy matching a pattern. +fnmatch\240\240\240\240\240\240\240\240 --\240 Filename matching with shell patterns. +formatter\240\240\240\240\240\240 --\240 A test formatter. +fpformat\240\240\240\240\240\240\240 --\240 General floating point formatting functions. +ftplib\240\240\240\240\240\240\240\240\240 --\240 An FTP client class.\240 Based on RFC 959. +getopt\240\240\240\240\240\240\240\240\240 --\240 Standard command line processing. +getpass\240\240\240\240\240\240\240\240 --\240 Utilities to get a password and/or the current user name. +glob\240\240\240\240\240\240\240\240\240\240\240 --\240 filename globbing. +gopherlib\240\240\240\240\240\240 --\240 Gopher protocol client interface. +grep\240\240\240\240\240\240\240\240\240\240\240 --\240 'grep' utilities. +gzip\240\240\240\240\240\240\240\240\240\240\240 --\240 Read & write gzipped files. +htmlentitydefs\240 --\240 Proposed entity definitions for HTML. +htmllib\240\240\240\240\240\240\240\240 --\240 HTML parsing utilities. +httplib\240\240\240\240\240\240\240\240 --\240 HTTP client class. +ihooks\240\240\240\240\240\240\240\240\240 --\240 Hooks into the "import" mechanism. +imaplib\240\240\240\240\240\240\240\240 --\240 IMAP4 client.Based on RFC 2060. +imghdr\240\240\240\240\240\240\240\240\240 --\240 Recognizing image files based on their first few bytes. +keyword\240\240\240\240\240\240\240\240 --\240 List of Python keywords. +knee\240\240\240\240\240\240\240\240\240\240\240 --\240 A Python re-implementation of hierarchical module import. +linecache\240\240\240\240\240\240 --\240 Cache lines from files. +locale\240\240\240\240\240\240\240\240\240 --\240 Support for number formatting using the current locale settings. +macpath\240\240\240\240\240\240\240\240 --\240 Pathname \201or related\202 operations for the Macintosh. +macurl2path\240\240\240\240 --\240 Mac specific module for conversion between pathnames and URLs. +mailbox\240\240\240\240\240\240\240\240 --\240 A class to handle a unix-style or mmdf-style mailbox. +mailcap\240\240\240\240\240\240\240\240 --\240 Mailcap file handling \201RFC 1524\202. +mhlib\240\240\240\240\240\240\240\240\240\240 --\240 MH \201mailbox\202 interface. +mimetools\240\240\240\240\240\240 --\240 Various tools used by MIME-reading or MIME-writing programs. +mimetypes\240\240\240\240\240\240 --\240 Guess the MIME type of a file.)WR( +MimeWriter\240\240\240\240\240 --\240 Generic MIME writer. +mimify\240\240\240\240\240\240\240\240\240 --\240 Mimification and unmimification of mail messages. +multifile\240\240\240\240\240\240 --\240 Class to make multi-file messages easier to handle. +mutex\240\240\240\240\240\240\240\240\240\240 --\240 Mutual exclusion -- for use with module sched. +netrc\240\240\240\240\240\240\240\240\240\240 --\240\240 +nntplib\240\240\240\240\240\240\240\240 --\240 An NNTP client class.\240 Based on RFC 977. +ntpath\240\240\240\240\240\240\240\240\240 --\240 Common operations on DOS pathnames. +nturl2path\240\240\240\240\240 --\240 Mac specific module for conversion between pathnames and URLs. +os\240\240\240\240\240\240\240\240\240\240\240\240\240 --\240 Either mac, dos or posix depending system. +packmail\240\240\240\240\240\240\240 --\240 Create a self-unpacking shell archive. +pdb\240\240\240\240\240\240\240\240\240\240\240\240 --\240 A Python debugger. +pickle\240\240\240\240\240\240\240\240\240 --\240 Pickling \201save and restore\202 of Python objects \201a faster C +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 implementation exists in built-in module: cPickle\202. +pipes\240\240\240\240\240\240\240\240\240\240 --\240 Conversion pipeline templates. +poly\240\240\240\240\240\240\240\240\240\240\240 --\240 Polynomials. +popen2\240\240\240\240\240\240\240\240\240 --\240 variations on pipe open. +poplib\240\240\240\240\240\240\240\240\240 --\240 A POP3 client class. Based on the J. Myers POP3 draft. +posixfile\240\240\240\240\240\240 --\240 Extended \201posix\202 file operations. +posixpath\240\240\240\240\240\240 --\240 Common operations on POSIX pathnames. +pprint\240\240\240\240\240\240\240\240\240 --\240 Support to pretty-print lists, tuples, & dictionaries recursively. +profile\240\240\240\240\240\240\240\240 --\240 Class for profiling python code. +pstats\240\240\240\240\240\240\240\240\240 --\240 Class for printing reports on profiled python code. +pty\240\240\240\240\240\240\240\240\240\240\240\240 --\240 Pseudo terminal utilities. +py_compile\240\240\240\240\240 --\240 Routine to "compile" a .py file to a .pyc file. +pyclbr\240\240\240\240\240\240\240\240\240 --\240 Parse a Python file and retrieve classes and methods. +Queue\240\240\240\240\240\240\240\240\240\240 --\240 A multi-producer, multi-consumer queue. +quopri\240\240\240\240\240\240\240\240\240 --\240 Conversions to/from quoted-printable transport encoding. +rand\240\240\240\240\240\240\240\240\240\240\240 --\240 Don't use unless you want compatibility with C's rand\201\202. +random\240\240\240\240\240\240\240\240\240 --\240 Random variable generators \201obsolete, use whrandom\202 +re\240\240\240\240\240\240\240\240\240\240\240\240\240 --\240 Regular Expressions.)WR( +reconvert\240\240\240\240\240\240 --\240 Convert old \201"regex"\202 regular expressions to new syntax \201"re"\202. +regex_syntax\240\240\240 --\240 Flags for regex.set_syntax\201\202. +regexp\240\240\240\240\240\240\240\240\240 --\240 Backward compatibility for module "regexp" using "regex". +regsub\240\240\240\240\240\240\240\240\240 --\240 Regular expression subroutines. +repr\240\240\240\240\240\240\240\240\240\240\240 --\240 Redo repr\201\202 but with limits on most sizes. +rexec\240\240\240\240\240\240\240\240\240\240 --\240 Restricted execution facilities \201"safe" exec, eval, etc\202. +rfc822\240\240\240\240\240\240\240\240\240 --\240 RFC-822 message manipulation class. +rlcompleter\240\240\240\240 --\240 Word completion for GNU readline 2.0. +sched\240\240\240\240\240\240\240\240\240\240 --\240 A generally useful event scheduler class. +sgmllib\240\240\240\240\240\240\240\240 --\240 A parser for SGML. +shelve\240\240\240\240\240\240\240\240\240 --\240 Manage shelves of pickled objects. +shlex\240\240\240\240\240\240\240\240\240\240 --\240 Lexical analyzer class for simple shell-like syntaxes. +shutil\240\240\240\240\240\240\240\240\240 --\240 Utility functions usable in a shell-like program. +SimpleHTTPServer--\240 Simple extension to base http class +site\240\240\240\240\240\240\240\240\240\240\240 --\240 Append module search paths for third-party packages to sys.path. +smtplib\240\240\240\240\240\240\240\240 --\240 SMTP Client class \201RFC 821\202 +sndhdr\240\240\240\240\240\240\240\240\240 --\240 Several routines that help recognizing sound. +SocketServer\240\240\240 --\240 Generic socket server classes. +stat\240\240\240\240\240\240\240\240\240\240\240 --\240 Constants and functions for interpreting stat/lstat struct. +statcache\240\240\240\240\240\240 --\240 Maintain a cache of file stats. +statvfs\240\240\240\240\240\240\240\240 --\240 Constants for interpreting statvfs struct as returned by os.statvfs\201\202 +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 and os.fstatvfs\201\202 \201if they exist\202. +string\240\240\240\240\240\240\240\240\240 --\240 A collection of string operations. +StringIO\240\240\240\240\240\240\240 --\240 File-like objects that read/write a string buffer \201a faster +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 C implementation exists in built-in module: cStringIO\202. +sunau\240\240\240\240\240\240\240\240\240\240 --\240 Stuff to parse Sun and NeXT audio files. +sunaudio\240\240\240\240\240\240\240 --\240 Interpret sun audio headers. +symbol\240\240\240\240\240\240\240\240\240 --\240 Non-terminal symbols of Python grammar \201from "graminit.h"\202. +telnetlib\240\240\240\240\240\240 --\240 TELNET client class. Based on RFC 854. +tempfile\240\240\240\240\240\240\240 --\240 Temporary file name allocation.)WR( +threading\240\240\240\240\240\240 --\240 Proposed new higher-level threading interfaces\240 +threading_api\240\240 --\240 \201doc of the threading module\202 +toaiff\240\240\240\240\240\240\240\240\240 --\240 Convert "arbitrary" sound files to AIFF files . +token\240\240\240\240\240\240\240\240\240\240 --\240 Tokens \201from "token.h"\202. +tokenize\240\240\240\240\240\240\240 --\240 Compiles a regular expression that recognizes Python tokens. +traceback\240\240\240\240\240\240 --\240 Format and print Python stack traces. +tty\240\240\240\240\240\240\240\240\240\240\240\240 --\240 Terminal utilities. +turtle\240\240\240\240\240\240\240\240\240 --\240 LogoMation-like turtle graphics +types\240\240\240\240\240\240\240\240\240\240 --\240 Define names for all type symbols in the std interpreter. +tzparse\240\240\240\240\240\240\240\240 --\240 Parse a timezone specification. +urllib\240\240\240\240\240\240\240\240\240 --\240 Open an arbitrary URL. +urlparse\240\240\240\240\240\240\240 --\240 Parse URLs according to latest draft of standard. +user\240\240\240\240\240\240\240\240\240\240\240 --\240 Hook to allow user-specified customization code to run. +UserDict\240\240\240\240\240\240\240 --\240 A wrapper to allow subclassing of built-in dict class. +UserList\240\240\240\240\240\240\240 --\240 A wrapper to allow subclassing of built-in list class. +util\240\240\240\240\240\240\240\240\240\240\240 --\240 some useful functions that don't fit elsewhere !! +uu\240\240\240\240\240\240\240\240\240\240\240\240\240 --\240 UUencode/UUdecode. +wave\240\240\240\240\240\240\240\240\240\240\240 --\240 Stuff to parse WAVE files. +whatsound\240\240\240\240\240\240 --\240 Several routines that help recognizing sound files. +whichdb\240\240\240\240\240\240\240\240 --\240 Guess which db package to use to open a db file. +whrandom\240\240\240\240\240\240\240 --\240 Wichmann-Hill random number generator. +xdrlib\240\240\240\240\240\240\240\240\240 --\240 Implements \201a subset of\202 Sun XDR \201eXternal Data Representation\202 +xmllib\240\240\240\240\240\240\240\240\240 --\240 A parser for XML, using the derived class as static DTD. +zmod\240\240\240\240\240\240\240\240\240\240\240 --\240 Demonstration of abstruse mathematical concepts.)RP( + +)0 3 50 H()WB 79 Sn( +)2 0.6 1 HR()EH( + +)0 3 51 H()WB 80 Sn()-1 Bf add FZ(\201following list not revised\202)BR()BR()Ef(* Built-ins *)EH( + +) 9 87 PR(\240\240\240\240\240\240\240\240\240\240\240 sys\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 Interpreter state vars and functions +\240\240\240\240\240\240\240\240\240\240\240 __built-in__\240\240\240\240\240\240\240 Access to all built-in python identifiers +\240\240\240\240\240\240\240\240\240\240\240 __main__\240\240\240\240\240\240\240\240\240\240\240 Scope of the interpreters main program, script or stdin +\240\240\240\240\240\240\240\240\240\240\240 array\240\240\240\240\240\240\240\240\240\240\240\240\240\240 Obj efficiently representing arrays of basic values +\240\240\240\240\240\240\240\240\240\240\240 math\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 Math functions of C standard +\240\240\240\240\240\240\240\240\240\240\240 time\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 Time-related functions +\240\240\240\240\240\240\240\240\240\240\240 regex\240\240\240\240\240\240\240\240\240\240\240\240\240\240 Regular expression matching operations +\240\240\240\240\240\240\240\240\240\240\240 marshal\240\240\240\240\240\240\240\240\240\240\240\240 Read and write some python values in binary format +\240\240\240\240\240\240\240\240\240\240\240 struct\240\240\240\240\240\240\240\240\240\240\240\240\240 Convert between python values and C structs)RP( + +)0 3 52 H(*)WB 81 Sn( Standard *)EH( + +) 7 87 PR(\240\240\240\240\240\240\240\240\240\240\240 getopt\240\240\240\240\240\240\240\240\240\240\240\240\240 Parse cmd line args in sys.argv.\240 A la UNIX 'getopt'. +\240\240\240\240\240\240\240\240\240\240\240 os\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 A more portable interface to OS dependent functionality +\240\240\240\240\240\240\240\240\240\240\240 re\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 Functions useful for working with regular expressions +\240\240\240\240\240\240\240\240\240\240\240 string\240\240\240\240\240\240\240\240\240\240\240\240\240 Useful string and characters functions and exceptions +\240\240\240\240\240\240\240\240\240\240\240 whrandom\240\240\240\240\240\240\240\240\240\240\240 Wichmann-Hill pseudo-random number generator +\240\240\240\240\240\240\240\240\240\240\240 thread\240\240\240\240\240\240\240\240\240\240\240\240\240 Low-level primitives for working with process threads +\240\240\240\240\240\240\240\240\240\240\240 threading\240\240\240\240\240\240\240\240\240\240 idem, new recommanded interface.)RP( + +)0 3 53 H(*)WB 82 Sn( Unix/Posix *)EH( + +) 7 86 PR(\240\240\240\240\240\240\240\240\240\240\240 dbm\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 Interface to Unix ndbm database library +\240\240\240\240\240\240\240\240\240\240\240 grp\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 Interface to Unix group database +\240\240\240\240\240\240\240\240\240\240\240 posix\240\240\240\240\240\240\240\240\240\240\240\240\240\240 OS functionality standardized by C and POSIX standards +\240\240\240\240\240\240\240\240\240\240\240 posixpath\240\240\240\240\240\240\240\240\240\240 POSIX pathname functions +\240\240\240\240\240\240\240\240\240\240\240 pwd\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 Access to the Unix password database +\240\240\240\240\240\240\240\240\240\240\240 select\240\240\240\240\240\240\240\240\240\240\240\240\240 Access to Unix select multiplex file synchronization +\240\240\240\240\240\240\240\240\240\240\240 socket\240\240\240\240\240\240\240\240\240\240\240\240\240 Access to BSD socket interface)RP( + +)0 3 54 H(*)WB 83 Sn( Tk User-interface Toolkit *)EH( + +) 1 52 PR(\240\240\240\240\240\240\240\240\240\240\240 tkinter\240\240\240\240\240\240\240\240\240\240\240\240 Main interface to Tk)RP( + +)0 3 55 H(*)WB 84 Sn( Multimedia *)EH( + +) 4 80 PR(\240\240\240\240\240\240\240\240\240\240\240 audioop\240\240\240\240\240\240\240\240\240\240\240\240 Useful operations on sound fragments +\240\240\240\240\240\240\240\240\240\240\240 imageop\240\240\240\240\240\240\240\240\240\240\240\240 Useful operations on images +\240\240\240\240\240\240\240\240\240\240\240 jpeg\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 Access to jpeg image compressor and decompressor +\240\240\240\240\240\240\240\240\240\240\240 rgbimg\240\240\240\240\240\240\240\240\240\240\240\240\240 Access SGI imglib image files)RP( + +)0 3 56 H(*)WB 85 Sn( Cryptographic Extensions *)EH( + +) 3 84 PR(\240\240\240\240\240\240\240\240\240\240\240 md5\240\240\240\240\240\240\240\240 Interface to RSA's MD5 message digest algorithm +\240\240\240\240\240\240\240\240\240\240\240 mpz\240\240\240\240\240\240\240\240 Interface to int part of GNU multiple precision library +\240\240\240\240\240\240\240\240\240\240\240 rotor\240\240\240\240\240\240\240\240\240\240\240\240\240\240 Implementation of a rotor-based encryption algorithm)RP( + +)0 3 57 H(*)WB 86 Sn( Stdwin * Standard Window System)EH( + +) 3 78 PR(\240\240\240\240\240\240\240\240\240\240\240 stdwin\240\240\240\240\240\240\240\240\240\240\240\240\240 Standard Window System interface +\240\240\240\240\240\240\240\240\240\240\240 stdwinevents\240\240\240\240\240\240\240 Stdwin event, command, and selection constants +\240\240\240\240\240\240\240\240\240\240\240 rect\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 Rectangle manipulation operations)RP( + +)0 3 58 H(*)WB 87 Sn( SGI IRIX * \2014 & 5\202)EH( + +) 10 54 PR(\240\240\240\240\240\240\240\240\240\240\240 al\240\240\240\240\240\240\240\240\240 SGI audio facilities +\240\240\240\240\240\240\240\240\240\240\240 AL\240\240\240\240\240\240\240\240\240 al constants +\240\240\240\240\240\240\240\240\240\240\240 fl\240\240\240\240\240\240\240\240\240 Interface to FORMS library +\240\240\240\240\240\240\240\240\240\240\240 FL\240\240\240\240\240\240\240\240\240 fl constants +\240\240\240\240\240\240\240\240\240\240\240 flp Functions for form designer +\240\240\240\240\240\240\240\240\240\240\240 fm\240\240\240\240\240\240\240\240\240 Access to font manager library +\240\240\240\240\240\240\240\240\240\240\240 gl\240\240\240\240\240\240\240\240\240 Access to graphics library +\240\240\240\240\240\240\240\240\240\240\240 GL\240\240\240\240\240\240\240\240\240 Constants for gl +\240\240\240\240\240\240\240\240\240\240\240 DEVICE\240\240\240\240\240 More constants for gl +\240\240\240\240\240\240\240\240\240\240\240 imgfile\240\240\240\240 Imglib image file interface)RP( + +)0 3 59 H(*)WB 88 Sn( Suns *)EH( + +) 1 53 PR(\240\240\240\240\240\240\240\240\240\240\240 sunaudiodev Access to sun audio interface)RP( + +)2 0.6 1 HR()0 2 60 H()WB 89 Sn()WB 26 Sn()EA(Workspace exploration and idiom hints)EH( + +) 8 85 PR(\240\240\240\240\240\240\240 dir\201<module>\202\240\240 list functions, variables in <module> +\240\240\240\240\240\240\240 dir\201\202\240\240\240\240\240\240\240\240\240\240 get object keys, defaults to local name space +\240\240\240\240\240\240\240 X.__methods__\240\240 list of methods supported by X \201if any\202 +\240\240\240\240\240\240\240 X.__members__\240\240 List of X's data attributes +\240\240\240\240\240\240\240 if __name__ == '__main__': main\201\202\240\240\240\240\240\240\240\240\240\240\240 invoke main if running as script +\240\240\240\240\240\240\240 map\201None, lst1, lst2, ...\202\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 merge lists +\240\240\240\240\240\240\240 b = a[:]\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 create copy of seq structure +\240\240\240\240\240\240\240 _\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 in interactive mode, is last value printed + + + + + + + + +)2 1 1 HR()RP( + +)0 2 61 H()WB 90 Sn()WB 27 Sn()EA(Python Mode for Emacs)EH( + +) 1 38 PR()BD()-1 Bf add FZ(\201Not revised, possibly not up to date\202)Ef()ES()RP( + +) 54 75 PR(Type C-c ? when in python-mode for extensive help. + +INDENTATION + +Primarily for entering new code: +\240\240\240\240\240\240\240 TAB\240\240\240\240\240 indent line appropriately +\240\240\240\240\240\240\240 LFD\240\240\240\240\240 insert newline, then indent +\240\240\240\240\240\240\240 DEL\240\240\240\240\240 reduce indentation, or delete single character + +Primarily for reindenting existing code: +\240\240\240\240\240\240\240 C-c :\240\240\240 guess py-indent-offset from file content; change locally +\240\240\240\240\240\240\240 C-u C-c :\240\240\240\240\240\240\240 ditto, but change globally + +\240\240\240\240\240\240\240 C-c TAB\240 reindent region to match its context +\240\240\240\240\240\240\240 C-c <\240\240\240 shift region left by py-indent-offset +\240\240\240\240\240\240\240 C-c >\240\240\240 shift region right by py-indent-offset + + +MARKING & MANIPULATING REGIONS OF CODE + +C-c C-b\240\240\240\240\240\240\240\240 mark block of lines +M-C-h\240\240\240\240\240\240\240\240\240\240 mark smallest enclosing def +C-u M-C-h\240\240\240\240\240\240 mark smallest enclosing class +C-c #\240\240\240\240\240\240\240\240\240\240 comment out region of code +C-u C-c #\240\240\240\240\240\240 uncomment region of code + +MOVING POINT + +C-c C-p\240\240\240\240\240\240\240\240 move to statement preceding point +C-c C-n\240\240\240\240\240\240\240\240 move to statement following point +C-c C-u\240\240\240\240\240\240\240\240 move up to start of current block)WR( +M-C-a\240\240\240\240\240\240\240\240\240\240 move to start of def +C-u M-C-a\240\240\240\240\240\240 move to start of class +M-C-e\240\240\240\240\240\240\240\240\240\240 move to end of def +C-u M-C-e\240\240\240\240\240\240 move to end of class + +EXECUTING PYTHON CODE + +C-c C-c sends the entire buffer to the Python interpreter +C-c |\240\240 sends the current region +C-c !\240\240 starts a Python interpreter window; this will be used by +\240\240\240\240\240\240\240 subsequent C-c C-c or C-c | commands + +VARIABLES + +py-indent-offset\240\240\240\240\240\240\240 indentation increment +py-block-comment-prefix comment string used by py-comment-region + +py-python-command\240\240\240\240\240\240 shell command to invoke Python interpreter +py-scroll-process-buffer\240\240\240\240\240\240\240 t means always scroll Python process buffer +py-temp-directory\240\240\240\240\240\240 directory used for temp files \201if needed\202 + + +py-beep-if-tab-change\240\240 ring the bell if tab-width is changed)RP( + +)2 1 1 HR()0 2 62 H()WB 91 Sn()WB 28 Sn()EA(The Python Debugger)EH( + +) 1 129 PR()BD()-1 Bf add FZ(\201Not revised, possibly not up to date, see 1.5.2 Library Ref section 9.1; in 1.5.2, you may also use debugger integrated in IDLE\202)Ef()ES()RP( + +)0 3 63 H(Accessing)WB 92 Sn()EH( + +) 19 92 PR(import )BD(pdb)ES(\240\240\240\240\240 \201it's a module written in Python\202 + +\240\240\240\240\240\240\240 -- defines )BD(functions :)ES(\240\240\240\240\240\240\240\240\240\240 run\201statement[,globals[, locals]]\202 +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 -- execute statement string under debugger control, with optional +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 global & local environment. +\240\240\240\240\240\240\240\240\240\240 runeval\201expression[,globals[, locals]]\202 +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 -- same as run, but evaluate expression and return value. +\240\240\240\240\240\240\240\240\240\240 runcall\201function[, argument, ...]\202 +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 -- run function object with given arg\201s\202 +\240\240\240\240\240\240\240\240\240\240 pm\201\202\240\240\240\240\240\240\240\240 -- run postmortem on last exception \201like debugging a core file\202 +\240\240\240\240\240\240\240\240\240\240 post_mortem\201t\202 +\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240 -- run postmortem on traceback object <t> +\240\240\240\240\240\240\240\240 +\240\240\240\240\240\240\240 -- defines )BD(class Pdb :)ES(\240\240\240\240\240\240\240\240\240\240 use Pdb to create reusable debugger objects. Object +\240\240\240\240\240\240\240\240\240\240 preserves state \201i.e. break points\202 between calls. + +\240 +\240\240\240\240\240\240\240 runs until a breakpoint hit, exception, or end of program +\240\240\240\240\240\240\240 If exception, variable '__exception__' holds \201exception,value\202.)RP( + +)0 3 64 H(Commands)WB 93 Sn()EH( + +) 51 78 PR(h, help +\240\240\240\240\240\240\240 brief reminder of commands +b, break [<arg>] +\240\240\240\240\240\240\240 if <arg> numeric, break at line <arg> in current file +\240\240\240\240\240\240\240 if <arg> is function object, break on entry to fcn <arg> +\240\240\240\240\240\240\240 if no arg, list breakpoints +cl, clear [<arg>] +\240\240\240\240\240\240\240 if <arg> numeric, clear breakpoint at <arg> in current file +\240\240\240\240\240\240\240 if no arg, clear all breakpoints after confirmation +w, where +\240\240\240\240\240\240\240 print current call stack +u, up +\240\240\240\240\240\240\240 move up one stack frame \201to top-level caller\202 +d, down +\240\240\240\240\240\240\240 move down one stack frame\240 +s, step +\240\240\240\240\240\240\240 advance one line in the program, stepping into calls +n, next +\240\240\240\240\240\240\240 advance one line, stepping over calls +r, return +\240\240\240\240\240\240\240 continue execution until current function returns +\240\240\240\240\240\240\240 \201return value is saved in variable "__return__", which +\240\240\240\240\240\240\240 can be printed or manipulated from debugger\202 +c, continue +\240\240\240\240\240\240\240 continue until next breakpoint +a, args +\240\240\240\240\240\240\240 print args to current function +rv, retval +\240\240\240\240\240\240\240 prints return value from last function that returned +p, print <arg> +\240\240\240\240\240\240\240 prints value of <arg> in current stack frame)WR( +l, list [<first> [, <last>]] +\240\240\240\240\240\240\240\240\240\240\240\240\240\240 List source code for the current file. +\240\240\240\240\240\240\240\240\240\240\240\240\240\240 Without arguments, list 11 lines around the current line +\240\240\240\240\240\240\240\240\240\240\240\240\240\240 or continue the previous listing. +\240\240\240\240\240\240\240\240\240\240\240\240\240\240 With one argument, list 11 lines starting at that line. +\240\240\240\240\240\240\240\240\240\240\240\240\240\240 With two arguments, list the given range; +\240\240\240\240\240\240\240\240\240\240\240\240\240\240 if the second argument is less than the first, it is a count. +whatis <arg> +\240\240\240\240\240\240\240 prints type of <arg> +!\240 +\240\240\240\240\240\240\240 executes rest of line as a Python statement in the current stack frame +q quit +\240\240\240\240\240\240\240 immediately stop execution and leave debugger + +<return> +\240\240\240\240\240\240\240 executes last command again + +Any input debugger doesn't recognize as a command is assumed to be a +Python statement to execute in the current stack frame, the same way +the exclamation mark \201"!"\202 command does.)RP( + +)0 3 65 H(Example)WB 94 Sn()EH( + +) 30 61 PR(\2011394\202 python +Python 1.0.3 \201Sep 26 1994\202 +Copyright 1991-1994 Stichting Mathematisch Centrum, Amsterdam +>>> import rm +>>> rm.run\201\202 +Traceback \201innermost last\202: +\240\240\240\240\240\240\240\240 File "<stdin>", line 1 +\240\240\240\240\240\240\240\240 File "./rm.py", line 7 +\240\240\240\240\240\240\240\240\240\240 x = div\2013\202 +\240\240\240\240\240\240\240\240 File "./rm.py", line 2 +\240\240\240\240\240\240\240\240\240\240 return a / r +ZeroDivisionError: integer division or modulo +>>> import pdb +>>> pdb.pm\201\202 +> ./rm.py\2012\202div: return a / r +\201Pdb\202 list +\240\240\240\240\240\240\240\240 1\240\240\240\240 def div\201a\202: +\240\240\240\240\240\240\240\240 2\240 ->\240\240\240\240 return a / r +\240\240\240\240\240\240\240\240 3\240\240 +\240\240\240\240\240\240\240\240 4\240\240\240\240 def run\201\202: +\240\240\240\240\240\240\240\240 5\240\240\240\240\240\240\240\240 global r +\240\240\240\240\240\240\240\240 6\240\240\240\240\240\240\240\240 r = 0 +\240\240\240\240\240\240\240\240 7\240\240\240\240\240\240\240\240 x = div\2013\202 +\240\240\240\240\240\240\240\240 8\240\240\240\240\240\240\240\240 print x +[EOF] +\201Pdb\202 print r +0 +\201Pdb\202 q +>>> pdb.runcall\201rm.run\202 +etc.)RP( + +)0 3 66 H(Quirks)WB 95 Sn()EH( +Breakpoints are stored as filename, line number tuples. If a module is +reloaded after editing, any remembered breakpoints are likely to be wrong. +)0 P(Always single-steps through top-most stack frame. That is, "c" acts +like "n". +)WB NL /BO 0 D TC /Ba f D Bs /AU f D /UR () D RC ZF +()0 1 -1 H(A Python Quick Reference)EH( + )0 2 -1 H(Table of Contents)EH()WB +ND 1 gt{Ts 3 mul Np 0()0 C()BD(A Python Quick Reference)ES()0 1 TN()EA()BN}if +1 NH le{29(1\240\240)1 C(Python 1.52 Quick Reference)29 1 TN()EA()BN}if +2 NH le{30(1.1\240\240)2 C(Contents)30 1 TN()EA()BN}if +2 NH le{31(1.2\240\240)2 C()WB 1 Sn(Invocation Options)31 1 TN()EA()BN}if +2 NH le{32(1.3\240\240)2 C()WB 2 Sn(ENVIRONMENT VARIABLES)32 1 TN()EA()BN}if +2 NH le{33(1.4\240\240)2 C()WB 3 Sn(Terms Used In This Document)33 1 TN()EA()BN}if +2 NH le{34(1.5\240\240)2 C()WB 4 Sn(Notable lexical entities)34 1 TN()EA()BN}if +3 NH le{35(1.5.1\240\240)3 C(Keywords)35 1 TN()EA()BN}if +3 NH le{36(1.5.2\240\240)3 C(Identifiers)36 1 TN()EA()BN}if +3 NH le{37(1.5.3\240\240)3 C(Operators)37 1 TN()EA()BN}if +3 NH le{38(1.5.4\240\240)3 C(Strings)38 1 TN()EA()BN}if +4 NH le{39(1.5.4.1\240\240)4 C(String Literal Escapes)39 1 TN()EA()BN}if +3 NH le{40(1.5.5\240\240)3 C(Numbers)40 1 TN()EA()BN}if +3 NH le{41(1.5.6\240\240)3 C(Sequences)41 1 TN()EA()BN}if +3 NH le{42(1.5.7\240\240)3 C(Dictionaries \201Mappings\202)42 1 TN()EA()BN}if +2 NH le{43(1.6\240\240)2 C()WB 5 Sn(Basic Types and Their Operations)43 1 TN()EA()BN}if +3 NH le{44(1.6.1\240\240)3 C(Comparisons \201defined between *any* types\202)44 1 TN()EA()BN}if +3 NH le{45(1.6.2\240\240)3 C(Boolean values and operators)45 1 TN()EA()BN}if +3 NH le{46(1.6.3\240\240)3 C(None)46 1 TN()EA()BN}if +3 NH le{47(1.6.4\240\240)3 C(Numeric types)47 1 TN()EA()BN}if +4 NH le{48(1.6.4.1\240\240)4 C(Floats, integers and long integers.)48 1 TN()EA()BN}if +4 NH le{49(1.6.4.2\240\240)4 C(Operators on all numeric types)49 1 TN()EA()BN}if +4 NH le{50(1.6.4.3\240\240)4 C(Bit operators on integers and long integers)50 1 TN()EA()BN}if +4 NH le{51(1.6.4.4\240\240)4 C(Complex Numbers)51 1 TN()EA()BN}if +4 NH le{52(1.6.4.5\240\240)4 C(Numeric exceptions)52 1 TN()EA()BN}if +3 NH le{53(1.6.5\240\240)3 C(Operations on all sequence types \201lists, tuples, strings\202)53 1 TN()EA()BN}if +3 NH le{54(1.6.6\240\240)3 C(Operations on mutable \201=modifiable\202 sequences \201lists\202)54 1 TN()EA()BN}if +3 NH le{55(1.6.7\240\240)3 C(Operations on mappings \201dictionaries\202)55 1 TN()EA()BN}if +3 NH le{56(1.6.8\240\240)3 C(Format operator for strings \201%\202)56 1 TN()EA()BN}if +4 NH le{57(1.6.8.1\240\240)4 C()3 FZ(Uses C )Ef(printf format codes :)57 1 TN()EA()BN}if +3 NH le{58(1.6.9\240\240)3 C()WB [16#00 16#00 16#00] Sc()3 FZ(File Objects)Ef()Ec()58 1 TN()EA()BN}if +4 NH le{59(1.6.9.1\240\240)4 C(Operators on file objects)59 1 TN()EA()BN}if +4 NH le{60(1.6.9.2\240\240)4 C(File Exceptions)60 1 TN()EA()BN}if +2 NH le{61(1.7\240\240)2 C()WB 6 Sn(Advanced Types)61 1 TN()EA()BN}if +2 NH le{62(1.8\240\240)2 C()WB 7 Sn(Statements)62 1 TN()EA()BN}if +3 NH le{63(1.8.1\240\240)3 C(Control Flow)63 1 TN()EA()BN}if +3 NH le{64(1.8.2\240\240)3 C(Exception Statements)64 1 TN()EA()BN}if +3 NH le{65(1.8.3\240\240)3 C(Name Space Statements)65 1 TN()EA()BN}if +3 NH le{66(1.8.4\240\240)3 C(Function Definition)66 1 TN()EA()BN}if +3 NH le{67(1.8.5\240\240)3 C(Class Definition)67 1 TN()EA()BN}if +4 NH le{68(1.8.5.1\240\240)4 C(Documentation Strings)68 1 TN()EA()BN}if +3 NH le{69(1.8.6\240\240)3 C(Others)69 1 TN()EA()BN}if +2 NH le{70(1.9\240\240)2 C()WB 8 Sn(Built-In Functions)70 1 TN()EA()BN}if +2 NH le{71(1.10\240\240)2 C()WB 9 Sn(Built-In Exceptions)71 1 TN()EA()BN}if +2 NH le{72(1.11\240\240)2 C()WB 10 Sn(Standard methods & operators redefinition +in classes)72 1 TN()EA()BN}if +3 NH le{73(1.11.1\240\240)3 C(Special methods for any class)73 1 TN()EA()BN}if +3 NH le{74(1.11.2\240\240)3 C(Operators)74 1 TN()EA()BN}if +2 NH le{75(1.12\240\240)2 C()WB 11 Sn(Special informative state attributes for some +types:)75 1 TN()EA()BN}if +2 NH le{76(1.13\240\240)2 C()WB 12 Sn(Important Modules)76 1 TN()EA()BN}if +2 NH le{77(1.14\240\240)2 C()WB 25 Sn(List of modules in base distribution)77 1 TN()EA()BN}if +3 NH le{78(1.14.1\240\240)3 C(Contents of Lib directory)BR()-1 Bf add FZ(\201Python 1.52 NT distribution, may be slightly different in +other distributions\202)Ef()78 1 TN()EA()BN}if +3 NH le{79(1.14.2\240\240)3 C( +)2 0.6 1 HR()79 1 TN()EA()BN}if +3 NH le{80(1.14.3\240\240)3 C()-1 Bf add FZ(\201following list not revised\202)BR()BR()Ef(* Built-ins *)80 1 TN()EA()BN}if +3 NH le{81(1.14.4\240\240)3 C(* Standard *)81 1 TN()EA()BN}if +3 NH le{82(1.14.5\240\240)3 C(* Unix/Posix *)82 1 TN()EA()BN}if +3 NH le{83(1.14.6\240\240)3 C(* Tk User-interface Toolkit *)83 1 TN()EA()BN}if +3 NH le{84(1.14.7\240\240)3 C(* Multimedia *)84 1 TN()EA()BN}if +3 NH le{85(1.14.8\240\240)3 C(* Cryptographic Extensions *)85 1 TN()EA()BN}if +3 NH le{86(1.14.9\240\240)3 C(* Stdwin * Standard Window System)86 1 TN()EA()BN}if +3 NH le{87(1.14.10\240\240)3 C(* SGI IRIX * \2014 & 5\202)87 1 TN()EA()BN}if +3 NH le{88(1.14.11\240\240)3 C(* Suns *)88 1 TN()EA()BN}if +2 NH le{89(1.15\240\240)2 C()WB 26 Sn(Workspace exploration and idiom hints)89 1 TN()EA()BN}if +2 NH le{90(1.16\240\240)2 C()WB 27 Sn(Python Mode for Emacs)90 1 TN()EA()BN}if +2 NH le{91(1.17\240\240)2 C()WB 28 Sn(The Python Debugger)91 1 TN()EA()BN}if +3 NH le{92(1.17.1\240\240)3 C(Accessing)92 1 TN()EA()BN}if +3 NH le{93(1.17.2\240\240)3 C(Commands)93 1 TN()EA()BN}if +3 NH le{94(1.17.3\240\240)3 C(Example)94 1 TN()EA()BN}if +3 NH le{95(1.17.4\240\240)3 C(Quirks)95 1 TN()EA()BN}if + +/TE t D NP TU PM 0 eq and{/Pn () D showpage}if end restore