Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
6ba2332f
Kaydet (Commit)
6ba2332f
authored
Eyl 03, 2008
tarafından
Benjamin Peterson
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
clean up some more bsddb scraps
üst
c469d4c3
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
3 additions
and
104 deletions
+3
-104
dbm.rst
Doc/library/dbm.rst
+0
-87
persistence.rst
Doc/library/persistence.rst
+1
-4
bsd.py
Lib/dbm/bsd.py
+0
-11
NEWS
Misc/NEWS
+2
-2
No files found.
Doc/library/dbm.rst
Dosyayı görüntüle @
6ba2332f
...
@@ -87,93 +87,6 @@ then prints out the contents of the database::
...
@@ -87,93 +87,6 @@ then prints out the contents of the database::
The individual submodules are described in the following sections.
The individual submodules are described in the following sections.
:mod:`dbm.bsd` --- DBM-style interface to the BSD database library
------------------------------------------------------------------
.. module:: dbm.bsd
:synopsis: DBM-style interface to the BSD database library.
.. sectionauthor:: Fred L. Drake, Jr. <fdrake@acm.org>
.. index:: module: bsddb
The :mod:`dbm.bsd` module provides a function to open databases using the BSD
``db`` library. This module mirrors the interface of the other Python database
modules that provide access to DBM-style databases. The :mod:`bsddb` module is
required to use :mod:`dbm.bsd`.
.. exception:: error
Exception raised on database errors other than :exc:`KeyError`. It is a synonym
for :exc:`bsddb.error`.
.. function:: open(path[, flag[, mode]])
Open a ``db`` database and return the database object. The *path* argument is
the name of the database file.
The *flag* argument can be:
+---------+-------------------------------------------+
| Value | Meaning |
+=========+===========================================+
| ``'r'`` | Open existing database for reading only |
| | (default) |
+---------+-------------------------------------------+
| ``'w'`` | Open existing database for reading and |
| | writing |
+---------+-------------------------------------------+
| ``'c'`` | Open database for reading and writing, |
| | creating it if it doesn't exist |
+---------+-------------------------------------------+
| ``'n'`` | Always create a new, empty database, open |
| | for reading and writing |
+---------+-------------------------------------------+
For platforms on which the BSD ``db`` library supports locking, an ``'l'``
can be appended to indicate that locking should be used.
The optional *mode* parameter is used to indicate the Unix permission bits that
should be set if a new database must be created; this will be masked by the
current umask value for the process.
The database objects returned by :func:`open` provide the methods common to all
the DBM-style databases and mapping objects. The following methods are
available in addition to the standard methods:
.. method:: dbhash.first()
It's possible to loop over every key/value pair in the database using this
method and the :meth:`next` method. The traversal is ordered by the databases
internal hash values, and won't be sorted by the key values. This method
returns the starting key.
.. method:: dbhash.last()
Return the last key/value pair in a database traversal. This may be used to
begin a reverse-order traversal; see :meth:`previous`.
.. method:: dbhash.next()
Returns the key next key/value pair in a database traversal. The following code
prints every key in the database ``db``, without having to create a list in
memory that contains them all::
print(db.first())
for i in range(1, len(db)):
print(db.next())
.. method:: dbhash.previous()
Returns the previous key/value pair in a forward-traversal of the database. In
conjunction with :meth:`last`, this may be used to implement a reverse-order
traversal.
.. method:: dbhash.sync()
This method forces any unwritten data to be written to the disk.
:mod:`dbm.gnu` --- GNU's reinterpretation of dbm
:mod:`dbm.gnu` --- GNU's reinterpretation of dbm
------------------------------------------------
------------------------------------------------
...
...
Doc/library/persistence.rst
Dosyayı görüntüle @
6ba2332f
...
@@ -9,9 +9,7 @@ The modules described in this chapter support storing Python data in a
...
@@ -9,9 +9,7 @@ The modules described in this chapter support storing Python data in a
persistent form on disk. The :mod:`pickle` and :mod:`marshal` modules can turn
persistent form on disk. The :mod:`pickle` and :mod:`marshal` modules can turn
many Python data types into a stream of bytes and then recreate the objects from
many Python data types into a stream of bytes and then recreate the objects from
the bytes. The various DBM-related modules support a family of hash-based file
the bytes. The various DBM-related modules support a family of hash-based file
formats that store a mapping of strings to other strings. The :mod:`bsddb`
formats that store a mapping of strings to other strings.
module also provides such disk-based string-to-string mappings based on hashing,
and also supports B-Tree and record-based formats.
The list of modules described in this chapter is:
The list of modules described in this chapter is:
...
@@ -23,5 +21,4 @@ The list of modules described in this chapter is:
...
@@ -23,5 +21,4 @@ The list of modules described in this chapter is:
shelve.rst
shelve.rst
marshal.rst
marshal.rst
dbm.rst
dbm.rst
bsddb.rst
sqlite3.rst
sqlite3.rst
Lib/dbm/bsd.py
deleted
100644 → 0
Dosyayı görüntüle @
c469d4c3
"""Provide a (g)dbm-compatible interface to bsddb.hashopen."""
import
bsddb
__all__
=
[
"error"
,
"open"
]
class
error
(
bsddb
.
error
,
IOError
):
pass
def
open
(
file
,
flag
=
'r'
,
mode
=
0
o666
):
return
bsddb
.
hashopen
(
file
,
flag
,
mode
)
Misc/NEWS
Dosyayı görüntüle @
6ba2332f
...
@@ -73,12 +73,12 @@ C API
...
@@ -73,12 +73,12 @@ C API
Library
Library
-------
-------
- The bsddb module (and therefore the dbm.bsd module) has been removed.
- Issue 600362: Relocated parse_qs() and parse_qsl(), from the cgi module
- Issue 600362: Relocated parse_qs() and parse_qsl(), from the cgi module
to the urlparse one. Added a DeprecationWarning in the old module, it
to the urlparse one. Added a DeprecationWarning in the old module, it
will be deprecated in the future.
will be deprecated in the future.
- The bsddb module has been removed.
- Issue #3719: platform.architecture() fails if there are spaces in the
- Issue #3719: platform.architecture() fails if there are spaces in the
path to the Python binary.
path to the Python binary.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment