diff6-10.chapter26.txtこのページは最後に更新されてから1年以上経過しています。情報が古い可能性がありますので、ご注意ください。 last mod. 2008-08-28 (木) 09:58:36
34d33 < 41,42d39 < < 53d49 < 60,61d55 < < 66,75c60,65 < Open a descriptor on an NDBM database. The first argument is < the name of the database (without the .dir and .pag suffixes). < The second argument is a list of flags: Dbm_rdonly opens the < database for reading only, Dbm_wronly for writing only, < Dbm_rdwr for reading and writing; Dbm_create causes the < database to be created if it does not already exist. The third < argument is the permissions to give to the database files, if < the database is created. < < --- > Open a descriptor on an NDBM database. The first argument is the name of > the database (without the .dir and .pag suffixes). The second argument is a > list of flags: Dbm_rdonly opens the database for reading only, Dbm_wronly > for writing only, Dbm_rdwr for reading and writing; Dbm_create causes the > database to be created if it does not already exist. The third argument is > the permissions to give to the database files, if the database is created. 83,84d72 < < 89,93c77,79 < find db key returns the data associated with the given key in < the database opened for the descriptor db. Raise Not_found if < the key has no associated data. < < --- > find db key returns the data associated with the given key in the database > opened for the descriptor db. Raise Not_found if the key has no associated > data. 99,103c85,87 < add db key data inserts the pair (key, data) in the database < db. If the database already contains data associated with key, < raise Dbm_error "Entry already exists". < < --- > add db key data inserts the pair (key, data) in the database db. If the > database already contains data associated with key, raise Dbm_error "Entry > already exists". 109,114c93,95 < replace db key data inserts the pair (key, data) in the < database db. If the database already contains data associated < with key, that data is discarded and silently replaced by the < new data. < < --- > replace db key data inserts the pair (key, data) in the database db. If the > database already contains data associated with key, that data is discarded > and silently replaced by the new data. 120,123c101,102 < remove db key data removes the data associated with key in db. < If key has no associated data, raise Dbm_error "dbm_delete". < < --- > remove db key data removes the data associated with key in db. If key has > no associated data, raise Dbm_error "dbm_delete". 131,132d109 < < 137,142c114,116 < Enumerate all keys in the given database, in an unspecified < order. firstkey db returns the first key, and repeated calls < to nextkey db return the remaining keys. Not_found is raised < when all keys have been enumerated. < < --- > Enumerate all keys in the given database, in an unspecified order. firstkey > db returns the first key, and repeated calls to nextkey db return the > remaining keys. Not_found is raised when all keys have been enumerated. 148,151c122,123 < iter f db applies f to each (key, data) pair in the database < db. f receives key as first argument and data as second < argument. < --- > iter f db applies f to each (key, data) pair in the database db. f receives > key as first argument and data as second argument. |