summaryrefslogtreecommitdiff
path: root/lib/python2.7/anydbm.pyc
blob: 6e67f7b7c6d12001c4f8413075f7e518747d38a9 (plain)
ofshex dumpascii
0000 03 f3 0d 0a 4b 5c ac 51 63 00 00 00 00 00 00 00 00 06 00 00 00 40 00 00 00 73 c9 00 00 00 64 00 ....K\.Qc............@...s....d.
0020 00 5a 00 00 64 01 00 65 01 00 66 01 00 64 02 00 84 00 00 83 00 00 59 5a 02 00 64 03 00 64 04 00 .Z..d..e..f..d........YZ..d..d..
0040 64 05 00 64 06 00 67 04 00 5a 03 00 65 02 00 67 01 00 5a 04 00 64 0b 00 5a 06 00 78 54 00 65 03 d..d..g..Z..e..g..Z..d..Z..xT.e.
0060 00 44 5d 4c 00 5a 07 00 79 10 00 65 08 00 65 07 00 83 01 00 5a 09 00 57 6e 14 00 04 65 0a 00 6b .D]L.Z..y..e..e.....Z..Wn...e..k
0080 0a 00 72 70 00 01 01 01 71 44 00 6e 01 00 58 65 06 00 73 80 00 65 09 00 5a 06 00 6e 00 00 65 04 ..rp....qD.n..Xe..s..e..Z..n..e.
00a0 00 6a 0b 00 65 09 00 6a 02 00 83 01 00 01 71 44 00 57 65 06 00 73 aa 00 65 0a 00 64 07 00 65 03 .j..e..j......qD.We..s..e..d..e.
00c0 00 16 82 02 00 6e 00 00 65 0c 00 65 04 00 83 01 00 5a 02 00 64 08 00 64 09 00 64 0a 00 84 02 00 .....n..e..e.....Z..d..d..d.....
00e0 5a 0d 00 64 0b 00 53 28 0c 00 00 00 73 8e 04 00 00 47 65 6e 65 72 69 63 20 69 6e 74 65 72 66 61 Z..d..S(....s....Generic.interfa
0100 63 65 20 74 6f 20 61 6c 6c 20 64 62 6d 20 63 6c 6f 6e 65 73 2e 0a 0a 49 6e 73 74 65 61 64 20 6f ce.to.all.dbm.clones...Instead.o
0120 66 0a 0a 20 20 20 20 20 20 20 20 69 6d 70 6f 72 74 20 64 62 6d 0a 20 20 20 20 20 20 20 20 64 20 f..........import.dbm.........d.
0140 3d 20 64 62 6d 2e 6f 70 65 6e 28 66 69 6c 65 2c 20 27 77 27 2c 20 30 36 36 36 29 0a 0a 75 73 65 =.dbm.open(file,.'w',.0666)..use
0160 0a 0a 20 20 20 20 20 20 20 20 69 6d 70 6f 72 74 20 61 6e 79 64 62 6d 0a 20 20 20 20 20 20 20 20 ..........import.anydbm.........
0180 64 20 3d 20 61 6e 79 64 62 6d 2e 6f 70 65 6e 28 66 69 6c 65 2c 20 27 77 27 29 0a 0a 54 68 65 20 d.=.anydbm.open(file,.'w')..The.
01a0 72 65 74 75 72 6e 65 64 20 6f 62 6a 65 63 74 20 69 73 20 61 20 64 62 68 61 73 68 2c 20 67 64 62 returned.object.is.a.dbhash,.gdb
01c0 6d 2c 20 64 62 6d 20 6f 72 20 64 75 6d 62 64 62 6d 20 6f 62 6a 65 63 74 2c 0a 64 65 70 65 6e 64 m,.dbm.or.dumbdbm.object,.depend
01e0 65 6e 74 20 6f 6e 20 74 68 65 20 74 79 70 65 20 6f 66 20 64 61 74 61 62 61 73 65 20 62 65 69 6e ent.on.the.type.of.database.bein
0200 67 20 6f 70 65 6e 65 64 20 28 64 65 74 65 72 6d 69 6e 65 64 20 62 79 20 77 68 69 63 68 64 62 0a g.opened.(determined.by.whichdb.
0220 6d 6f 64 75 6c 65 29 20 69 6e 20 74 68 65 20 63 61 73 65 20 6f 66 20 61 6e 20 65 78 69 73 74 69 module).in.the.case.of.an.existi
0240 6e 67 20 64 62 6d 2e 20 49 66 20 74 68 65 20 64 62 6d 20 64 6f 65 73 20 6e 6f 74 20 65 78 69 73 ng.dbm..If.the.dbm.does.not.exis
0260 74 20 61 6e 64 0a 74 68 65 20 63 72 65 61 74 65 20 6f 72 20 6e 65 77 20 66 6c 61 67 20 28 27 63 t.and.the.create.or.new.flag.('c
0280 27 20 6f 72 20 27 6e 27 29 20 77 61 73 20 73 70 65 63 69 66 69 65 64 2c 20 74 68 65 20 64 62 6d '.or.'n').was.specified,.the.dbm
02a0 20 74 79 70 65 20 77 69 6c 6c 0a 62 65 20 64 65 74 65 72 6d 69 6e 65 64 20 62 79 20 74 68 65 20 .type.will.be.determined.by.the.
02c0 61 76 61 69 6c 61 62 69 6c 69 74 79 20 6f 66 20 74 68 65 20 6d 6f 64 75 6c 65 73 20 28 74 65 73 availability.of.the.modules.(tes
02e0 74 65 64 20 69 6e 20 74 68 65 20 61 62 6f 76 65 0a 6f 72 64 65 72 29 2e 0a 0a 49 74 20 68 61 73 ted.in.the.above.order)...It.has
0300 20 74 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 69 6e 74 65 72 66 61 63 65 20 28 6b 65 79 20 61 6e .the.following.interface.(key.an
0320 64 20 64 61 74 61 20 61 72 65 20 73 74 72 69 6e 67 73 29 3a 0a 0a 20 20 20 20 20 20 20 20 64 5b d.data.are.strings):..........d[
0340 6b 65 79 5d 20 3d 20 64 61 74 61 20 20 20 23 20 73 74 6f 72 65 20 64 61 74 61 20 61 74 20 6b 65 key].=.data...#.store.data.at.ke
0360 79 20 28 6d 61 79 20 6f 76 65 72 72 69 64 65 20 64 61 74 61 20 61 74 0a 20 20 20 20 20 20 20 20 y.(may.override.data.at.........
0380 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 23 20 65 78 69 73 74 69 6e 67 20 6b 65 79 29 0a ................#.existing.key).
03a0 20 20 20 20 20 20 20 20 64 61 74 61 20 3d 20 64 5b 6b 65 79 5d 20 20 20 23 20 72 65 74 72 69 65 ........data.=.d[key]...#.retrie
03c0 76 65 20 64 61 74 61 20 61 74 20 6b 65 79 20 28 72 61 69 73 65 20 4b 65 79 45 72 72 6f 72 20 69 ve.data.at.key.(raise.KeyError.i
03e0 66 20 6e 6f 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 23 20 73 f.no.........................#.s
0400 75 63 68 20 6b 65 79 29 0a 20 20 20 20 20 20 20 20 64 65 6c 20 64 5b 6b 65 79 5d 20 20 20 20 20 uch.key).........del.d[key].....
0420 20 23 20 64 65 6c 65 74 65 20 64 61 74 61 20 73 74 6f 72 65 64 20 61 74 20 6b 65 79 20 28 72 61 .#.delete.data.stored.at.key.(ra
0440 69 73 65 73 20 4b 65 79 45 72 72 6f 72 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ises.KeyError...................
0460 20 20 20 20 20 20 23 20 69 66 20 6e 6f 20 73 75 63 68 20 6b 65 79 29 0a 20 20 20 20 20 20 20 20 ......#.if.no.such.key).........
0480 66 6c 61 67 20 3d 20 6b 65 79 20 69 6e 20 64 20 20 20 23 20 74 72 75 65 20 69 66 20 74 68 65 20 flag.=.key.in.d...#.true.if.the.
04a0 6b 65 79 20 65 78 69 73 74 73 0a 20 20 20 20 20 20 20 20 6c 69 73 74 20 3d 20 64 2e 6b 65 79 73 key.exists.........list.=.d.keys
04c0 28 29 20 23 20 72 65 74 75 72 6e 20 61 20 6c 69 73 74 20 6f 66 20 61 6c 6c 20 65 78 69 73 74 69 ().#.return.a.list.of.all.existi
04e0 6e 67 20 6b 65 79 73 20 28 73 6c 6f 77 21 29 0a 0a 46 75 74 75 72 65 20 76 65 72 73 69 6f 6e 73 ng.keys.(slow!)..Future.versions
0500 20 6d 61 79 20 63 68 61 6e 67 65 20 74 68 65 20 6f 72 64 65 72 20 69 6e 20 77 68 69 63 68 20 69 .may.change.the.order.in.which.i
0520 6d 70 6c 65 6d 65 6e 74 61 74 69 6f 6e 73 20 61 72 65 0a 74 65 73 74 65 64 20 66 6f 72 20 65 78 mplementations.are.tested.for.ex
0540 69 73 74 65 6e 63 65 2c 20 61 6e 64 20 61 64 64 20 69 6e 74 65 72 66 61 63 65 73 20 74 6f 20 6f istence,.and.add.interfaces.to.o
0560 74 68 65 72 20 64 62 6d 2d 6c 69 6b 65 0a 69 6d 70 6c 65 6d 65 6e 74 61 74 69 6f 6e 73 2e 0a 74 ther.dbm-like.implementations..t
0580 05 00 00 00 65 72 72 6f 72 63 00 00 00 00 00 00 00 00 01 00 00 00 42 00 00 00 73 08 00 00 00 65 ....errorc............B...s....e
05a0 00 00 5a 01 00 52 53 28 00 00 00 00 28 02 00 00 00 74 08 00 00 00 5f 5f 6e 61 6d 65 5f 5f 74 0a ..Z..RS(....(....t....__name__t.
05c0 00 00 00 5f 5f 6d 6f 64 75 6c 65 5f 5f 28 00 00 00 00 28 00 00 00 00 28 00 00 00 00 73 4e 00 00 ...__module__(....(....(....sN..
05e0 00 2f 74 6d 70 2f 6e 64 6b 2d 55 73 65 72 2f 62 75 69 6c 64 68 6f 73 74 2f 69 6e 73 74 61 6c 6c ./tmp/ndk-User/buildhost/install
0600 2f 70 72 65 62 75 69 6c 74 2f 64 61 72 77 69 6e 2d 78 38 36 5f 36 34 2f 6c 69 62 2f 70 79 74 68 /prebuilt/darwin-x86_64/lib/pyth
0620 6f 6e 32 2e 37 2f 61 6e 79 64 62 6d 2e 70 79 52 00 00 00 00 24 00 00 00 73 02 00 00 00 06 01 74 on2.7/anydbm.pyR....$...s......t
0640 06 00 00 00 64 62 68 61 73 68 74 04 00 00 00 67 64 62 6d 74 03 00 00 00 64 62 6d 74 07 00 00 00 ....dbhasht....gdbmt....dbmt....
0660 64 75 6d 62 64 62 6d 73 1c 00 00 00 6e 6f 20 64 62 6d 20 63 6c 6f 6e 65 20 66 6f 75 6e 64 3b 20 dumbdbms....no.dbm.clone.found;.
0680 74 72 69 65 64 20 25 73 74 01 00 00 00 72 69 b6 01 00 00 63 03 00 00 00 06 00 00 00 05 00 00 00 tried.%st....ri....c............
06a0 43 00 00 00 73 8c 00 00 00 64 01 00 64 02 00 6c 00 00 6d 00 00 7d 03 00 01 7c 03 00 7c 00 00 83 C...s....d..d..l..m..}...|..|...
06c0 01 00 7d 04 00 7c 04 00 64 08 00 6b 08 00 72 55 00 64 03 00 7c 01 00 6b 06 00 73 40 00 64 04 00 ..}..|..d..k..rU.d..|..k..s@.d..
06e0 7c 01 00 6b 06 00 72 49 00 74 02 00 7d 05 00 71 79 00 74 03 00 64 05 00 82 02 00 6e 24 00 7c 04 |..k..rI.t..}..qy.t..d.....n$.|.
0700 00 64 06 00 6b 02 00 72 6d 00 74 03 00 64 07 00 82 02 00 6e 0c 00 74 04 00 7c 04 00 83 01 00 7d .d..k..rm.t..d.....n..t..|.....}
0720 05 00 7c 05 00 6a 05 00 7c 00 00 7c 01 00 7c 02 00 83 03 00 53 28 09 00 00 00 73 b6 01 00 00 4f ..|..j..|..|..|.....S(....s....O
0740 70 65 6e 20 6f 72 20 63 72 65 61 74 65 20 64 61 74 61 62 61 73 65 20 61 74 20 70 61 74 68 20 67 pen.or.create.database.at.path.g
0760 69 76 65 6e 20 62 79 20 2a 66 69 6c 65 2a 2e 0a 0a 20 20 20 20 4f 70 74 69 6f 6e 61 6c 20 61 72 iven.by.*file*.......Optional.ar
0780 67 75 6d 65 6e 74 20 2a 66 6c 61 67 2a 20 63 61 6e 20 62 65 20 27 72 27 20 28 64 65 66 61 75 6c gument.*flag*.can.be.'r'.(defaul
07a0 74 29 20 66 6f 72 20 72 65 61 64 2d 6f 6e 6c 79 20 61 63 63 65 73 73 2c 20 27 77 27 0a 20 20 20 t).for.read-only.access,.'w'....
07c0 20 66 6f 72 20 72 65 61 64 2d 77 72 69 74 65 20 61 63 63 65 73 73 20 6f 66 20 61 6e 20 65 78 69 .for.read-write.access.of.an.exi
07e0 73 74 69 6e 67 20 64 61 74 61 62 61 73 65 2c 20 27 63 27 20 66 6f 72 20 72 65 61 64 2d 77 72 69 sting.database,.'c'.for.read-wri
0800 74 65 20 61 63 63 65 73 73 0a 20 20 20 20 74 6f 20 61 20 6e 65 77 20 6f 72 20 65 78 69 73 74 69 te.access.....to.a.new.or.existi
0820 6e 67 20 64 61 74 61 62 61 73 65 2c 20 61 6e 64 20 27 6e 27 20 66 6f 72 20 72 65 61 64 2d 77 72 ng.database,.and.'n'.for.read-wr
0840 69 74 65 20 61 63 63 65 73 73 20 74 6f 20 61 20 6e 65 77 0a 20 20 20 20 64 61 74 61 62 61 73 65 ite.access.to.a.new.....database
0860 2e 0a 0a 20 20 20 20 4e 6f 74 65 3a 20 27 72 27 20 61 6e 64 20 27 77 27 20 66 61 69 6c 20 69 66 .......Note:.'r'.and.'w'.fail.if
0880 20 74 68 65 20 64 61 74 61 62 61 73 65 20 64 6f 65 73 6e 27 74 20 65 78 69 73 74 3b 20 27 63 27 .the.database.doesn't.exist;.'c'
08a0 20 63 72 65 61 74 65 73 20 69 74 0a 20 20 20 20 6f 6e 6c 79 20 69 66 20 69 74 20 64 6f 65 73 6e .creates.it.....only.if.it.doesn
08c0 27 74 20 65 78 69 73 74 3b 20 61 6e 64 20 27 6e 27 20 61 6c 77 61 79 73 20 63 72 65 61 74 65 73 't.exist;.and.'n'.always.creates
08e0 20 61 20 6e 65 77 20 64 61 74 61 62 61 73 65 2e 0a 20 20 20 20 69 ff ff ff ff 28 01 00 00 00 74 .a.new.database......i....(....t
0900 07 00 00 00 77 68 69 63 68 64 62 74 01 00 00 00 63 74 01 00 00 00 6e 73 23 00 00 00 6e 65 65 64 ....whichdbt....ct....ns#...need
0920 20 27 63 27 20 6f 72 20 27 6e 27 20 66 6c 61 67 20 74 6f 20 6f 70 65 6e 20 6e 65 77 20 64 62 74 .'c'.or.'n'.flag.to.open.new.dbt
0940 00 00 00 00 73 1f 00 00 00 64 62 20 74 79 70 65 20 63 6f 75 6c 64 20 6e 6f 74 20 62 65 20 64 65 ....s....db.type.could.not.be.de
0960 74 65 72 6d 69 6e 65 64 4e 28 06 00 00 00 52 08 00 00 00 74 04 00 00 00 4e 6f 6e 65 74 0b 00 00 terminedN(....R....t....Nonet...
0980 00 5f 64 65 66 61 75 6c 74 6d 6f 64 52 00 00 00 00 74 0a 00 00 00 5f 5f 69 6d 70 6f 72 74 5f 5f ._defaultmodR....t....__import__
09a0 74 04 00 00 00 6f 70 65 6e 28 06 00 00 00 74 04 00 00 00 66 69 6c 65 74 04 00 00 00 66 6c 61 67 t....open(....t....filet....flag
09c0 74 04 00 00 00 6d 6f 64 65 52 08 00 00 00 74 06 00 00 00 72 65 73 75 6c 74 74 03 00 00 00 6d 6f t....modeR....t....resultt....mo
09e0 64 28 00 00 00 00 28 00 00 00 00 73 4e 00 00 00 2f 74 6d 70 2f 6e 64 6b 2d 55 73 65 72 2f 62 75 d(....(....sN.../tmp/ndk-User/bu
0a00 69 6c 64 68 6f 73 74 2f 69 6e 73 74 61 6c 6c 2f 70 72 65 62 75 69 6c 74 2f 64 61 72 77 69 6e 2d ildhost/install/prebuilt/darwin-
0a20 78 38 36 5f 36 34 2f 6c 69 62 2f 70 79 74 68 6f 6e 32 2e 37 2f 61 6e 79 64 62 6d 2e 70 79 52 0f x86_64/lib/python2.7/anydbm.pyR.
0a40 00 00 00 39 00 00 00 73 14 00 00 00 00 0d 10 01 0c 01 0c 02 18 03 09 02 0c 01 0c 02 0c 02 0c 01 ...9...s........................
0a60 4e 28 0e 00 00 00 74 07 00 00 00 5f 5f 64 6f 63 5f 5f 74 09 00 00 00 45 78 63 65 70 74 69 6f 6e N(....t....__doc__t....Exception
0a80 52 00 00 00 00 74 06 00 00 00 5f 6e 61 6d 65 73 74 07 00 00 00 5f 65 72 72 6f 72 73 52 0c 00 00 R....t...._namest...._errorsR...
0aa0 00 52 0d 00 00 00 74 05 00 00 00 5f 6e 61 6d 65 52 0e 00 00 00 74 04 00 00 00 5f 6d 6f 64 74 0b .R....t...._nameR....t...._modt.
0ac0 00 00 00 49 6d 70 6f 72 74 45 72 72 6f 72 74 06 00 00 00 61 70 70 65 6e 64 74 05 00 00 00 74 75 ...ImportErrort....appendt....tu
0ae0 70 6c 65 52 0f 00 00 00 28 00 00 00 00 28 00 00 00 00 28 00 00 00 00 73 4e 00 00 00 2f 74 6d 70 pleR....(....(....(....sN.../tmp
0b00 2f 6e 64 6b 2d 55 73 65 72 2f 62 75 69 6c 64 68 6f 73 74 2f 69 6e 73 74 61 6c 6c 2f 70 72 65 62 /ndk-User/buildhost/install/preb
0b20 75 69 6c 74 2f 64 61 72 77 69 6e 2d 78 38 36 5f 36 34 2f 6c 69 62 2f 70 79 74 68 6f 6e 32 2e 37 uilt/darwin-x86_64/lib/python2.7
0b40 2f 61 6e 79 64 62 6d 2e 70 79 74 08 00 00 00 3c 6d 6f 64 75 6c 65 3e 22 00 00 00 73 20 00 00 00 /anydbm.pyt....<module>"...s....
0b60 06 02 16 03 12 01 09 01 06 02 0d 01 03 01 10 01 0d 01 07 01 06 01 09 01 14 02 06 01 10 02 0c 02 ................................