Markdown Format | JSON API | MCP Server Tool
Help on module _gdbm: NAME _gdbm - This module provides an interface to the GNU DBM (GDBM) library. MODULE REFERENCE https://docs.python.org/3.10/library/_gdbm.html The following documentation is automatically generated from the Python source files. It may be incomplete, incorrect or include features that are considered implementation detail and may vary between Python implementations. When in doubt, consult the module reference at the location listed above. DESCRIPTION This module is quite similar to the dbm module, but uses GDBM instead to provide some additional functionality. Please note that the file formats created by GDBM and dbm are incompatible. GDBM objects behave like mappings (dictionaries), except that keys and values are always immutable bytes-like objects or strings. Printing a GDBM object doesn't print the keys and values, and the items() and values() methods are not supported. CLASSES builtins.OSError(builtins.Exception) error class error(builtins.OSError) | Method resolution order: | error | builtins.OSError | builtins.Exception | builtins.BaseException | builtins.object | | Data descriptors defined here: | | __weakref__ | list of weak references to the object (if defined) | | ---------------------------------------------------------------------- | Methods inherited from builtins.OSError: | | __init__(self, /, *args, **kwargs) | Initialize self. See help(type(self)) for accurate signature. | | __reduce__(...) | Helper for pickle. | | __str__(self, /) | Return str(self). | | ---------------------------------------------------------------------- | Static methods inherited from builtins.OSError: | | __new__(*args, **kwargs) from builtins.type | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.OSError: | | characters_written | | errno | POSIX exception code | | filename | exception filename | | filename2 | second exception filename | | strerror | exception strerror | | ---------------------------------------------------------------------- | Methods inherited from builtins.BaseException: | | __delattr__(self, name, /) | Implement delattr(self, name). | | __getattribute__(self, name, /) | Return getattr(self, name). | | __repr__(self, /) | Return repr(self). | | __setattr__(self, name, value, /) | Implement setattr(self, name, value). | | __setstate__(...) | | with_traceback(...) | Exception.with_traceback(tb) -- | set self.__traceback__ to tb and return self. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.BaseException: | | __cause__ | exception cause | | __context__ | exception context | | __dict__ | | __suppress_context__ | | __traceback__ | | args FUNCTIONS open(filename, flags='r', mode=438, /) Open a dbm database and return a dbm object. The filename argument is the name of the database file. The optional flags argument can be 'r' (to open an existing database for reading only -- default), 'w' (to open an existing database for reading and writing), 'c' (which creates the database if it doesn't exist), or 'n' (which always creates a new empty database). Some versions of gdbm support additional flags which must be appended to one of the flags described above. The module constant 'open_flags' is a string of valid additional flags. The 'f' flag opens the database in fast mode; altered data will not automatically be written to the disk after every change. This results in faster writes to the database, but may result in an inconsistent database if the program crashes while the database is still open. Use the sync() method to force any unwritten data to be written to the disk. The 's' flag causes all database operations to be synchronized to disk. The 'u' flag disables locking of the database file. The optional mode argument is the Unix mode of the file, used only when the database has to be created. It defaults to octal 0o666. DATA open_flags = 'rwcnfsu' FILE /usr/lib/python3.10/lib-dynload/_gdbm.cpython-310-x86_64-linux-gnu.so
Generated by phpMan Author: Che Dong Under GNU General Public License
2026-06-02 05:15 @216.73.216.198 CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)