python-docs-fr/library/shelve.po

266 lines
8.9 KiB
Plaintext

# SOME DESCRIPTIVE TITLE.
# Copyright (C) 1990-2016, Python Software Foundation
# This file is distributed under the same license as the Python package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: Python 2.7\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-10-30 10:44+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: ../Doc/library/shelve.rst:2
msgid ":mod:`shelve` --- Python object persistence"
msgstr ""
#: ../Doc/library/shelve.rst:10
msgid "**Source code:** :source:`Lib/shelve.py`"
msgstr "**Code source :** :source:`Lib/shelve.py`"
#: ../Doc/library/shelve.rst:14
msgid ""
"A \"shelf\" is a persistent, dictionary-like object. The difference with "
"\"dbm\" databases is that the values (not the keys!) in a shelf can be "
"essentially arbitrary Python objects --- anything that the :mod:`pickle` "
"module can handle. This includes most class instances, recursive data types, "
"and objects containing lots of shared sub-objects. The keys are ordinary "
"strings."
msgstr ""
#: ../Doc/library/shelve.rst:23
msgid ""
"Open a persistent dictionary. The filename specified is the base filename "
"for the underlying database. As a side-effect, an extension may be added to "
"the filename and more than one file may be created. By default, the "
"underlying database file is opened for reading and writing. The optional "
"*flag* parameter has the same interpretation as the *flag* parameter of :"
"func:`anydbm.open`."
msgstr ""
#: ../Doc/library/shelve.rst:29
msgid ""
"By default, version 0 pickles are used to serialize values. The version of "
"the pickle protocol can be specified with the *protocol* parameter."
msgstr ""
#: ../Doc/library/shelve.rst:32 ../Doc/library/shelve.rst:118
msgid "The *protocol* parameter was added."
msgstr ""
#: ../Doc/library/shelve.rst:35
msgid ""
"Because of Python semantics, a shelf cannot know when a mutable persistent-"
"dictionary entry is modified. By default modified objects are written "
"*only* when assigned to the shelf (see :ref:`shelve-example`). If the "
"optional *writeback* parameter is set to ``True``, all entries accessed are "
"also cached in memory, and written back on :meth:`~Shelf.sync` and :meth:"
"`~Shelf.close`; this can make it handier to mutate mutable entries in the "
"persistent dictionary, but, if many entries are accessed, it can consume "
"vast amounts of memory for the cache, and it can make the close operation "
"very slow since all accessed entries are written back (there is no way to "
"determine which accessed entries are mutable, nor which ones were actually "
"mutated)."
msgstr ""
#: ../Doc/library/shelve.rst:47
msgid ""
"Like file objects, shelve objects should be closed explicitly to ensure that "
"the persistent data is flushed to disk."
msgstr ""
#: ../Doc/library/shelve.rst:52
msgid ""
"Because the :mod:`shelve` module is backed by :mod:`pickle`, it is insecure "
"to load a shelf from an untrusted source. Like with pickle, loading a shelf "
"can execute arbitrary code."
msgstr ""
#: ../Doc/library/shelve.rst:56
msgid ""
"Shelf objects support most of the methods supported by dictionaries. This "
"eases the transition from dictionary based scripts to those requiring "
"persistent storage."
msgstr ""
#: ../Doc/library/shelve.rst:60
msgid ""
"Note, the Python 3 transition methods (:meth:`~dict.viewkeys`, :meth:`~dict."
"viewvalues`, and :meth:`~dict.viewitems`) are not supported."
msgstr ""
#: ../Doc/library/shelve.rst:63
msgid "Two additional methods are supported:"
msgstr ""
#: ../Doc/library/shelve.rst:67
msgid ""
"Write back all entries in the cache if the shelf was opened with *writeback* "
"set to :const:`True`. Also empty the cache and synchronize the persistent "
"dictionary on disk, if feasible. This is called automatically when the "
"shelf is closed with :meth:`close`."
msgstr ""
#: ../Doc/library/shelve.rst:74
msgid ""
"Synchronize and close the persistent *dict* object. Operations on a closed "
"shelf will fail with a :exc:`ValueError`."
msgstr ""
#: ../Doc/library/shelve.rst:80
msgid ""
"`Persistent dictionary recipe <https://code.activestate.com/recipes/576642/"
">`_ with widely supported storage formats and having the speed of native "
"dictionaries."
msgstr ""
#: ../Doc/library/shelve.rst:86
msgid "Restrictions"
msgstr ""
#: ../Doc/library/shelve.rst:93
msgid ""
"The choice of which database package will be used (such as :mod:`dbm`, :mod:"
"`gdbm` or :mod:`bsddb`) depends on which interface is available. Therefore "
"it is not safe to open the database directly using :mod:`dbm`. The database "
"is also (unfortunately) subject to the limitations of :mod:`dbm`, if it is "
"used --- this means that (the pickled representation of) the objects stored "
"in the database should be fairly small, and in rare cases key collisions may "
"cause the database to refuse updates."
msgstr ""
#: ../Doc/library/shelve.rst:101
msgid ""
"The :mod:`shelve` module does not support *concurrent* read/write access to "
"shelved objects. (Multiple simultaneous read accesses are safe.) When a "
"program has a shelf open for writing, no other program should have it open "
"for reading or writing. Unix file locking can be used to solve this, but "
"this differs across Unix versions and requires knowledge about the database "
"implementation used."
msgstr ""
#: ../Doc/library/shelve.rst:111
msgid ""
"A subclass of :class:`UserDict.DictMixin` which stores pickled values in the "
"*dict* object."
msgstr ""
#: ../Doc/library/shelve.rst:114
msgid ""
"By default, version 0 pickles are used to serialize values. The version of "
"the pickle protocol can be specified with the *protocol* parameter. See the :"
"mod:`pickle` documentation for a discussion of the pickle protocols."
msgstr ""
#: ../Doc/library/shelve.rst:121
msgid ""
"If the *writeback* parameter is ``True``, the object will hold a cache of "
"all entries accessed and write them back to the *dict* at sync and close "
"times. This allows natural operations on mutable entries, but can consume "
"much more memory and make sync and close take a long time."
msgstr ""
#: ../Doc/library/shelve.rst:129
msgid ""
"A subclass of :class:`Shelf` which exposes :meth:`first`, :meth:`!next`, :"
"meth:`previous`, :meth:`last` and :meth:`set_location` which are available "
"in the :mod:`bsddb` module but not in other database modules. The *dict* "
"object passed to the constructor must support those methods. This is "
"generally accomplished by calling one of :func:`bsddb.hashopen`, :func:"
"`bsddb.btopen` or :func:`bsddb.rnopen`. The optional *protocol* and "
"*writeback* parameters have the same interpretation as for the :class:"
"`Shelf` class."
msgstr ""
#: ../Doc/library/shelve.rst:140
msgid ""
"A subclass of :class:`Shelf` which accepts a *filename* instead of a dict-"
"like object. The underlying file will be opened using :func:`anydbm.open`. "
"By default, the file will be created and opened for both read and write. "
"The optional *flag* parameter has the same interpretation as for the :func:`."
"open` function. The optional *protocol* and *writeback* parameters have the "
"same interpretation as for the :class:`Shelf` class."
msgstr ""
#: ../Doc/library/shelve.rst:151
msgid "Example"
msgstr "Exemple"
#: ../Doc/library/shelve.rst:153
msgid ""
"To summarize the interface (``key`` is a string, ``data`` is an arbitrary "
"object)::"
msgstr ""
#: ../Doc/library/shelve.rst:189
msgid "Module :mod:`anydbm`"
msgstr ""
#: ../Doc/library/shelve.rst:189
msgid "Generic interface to ``dbm``\\ -style databases."
msgstr ""
#: ../Doc/library/shelve.rst:192
msgid "Module :mod:`bsddb`"
msgstr ""
#: ../Doc/library/shelve.rst:192
msgid "BSD ``db`` database interface."
msgstr ""
#: ../Doc/library/shelve.rst:196
msgid "Module :mod:`dbhash`"
msgstr ""
#: ../Doc/library/shelve.rst:195
msgid ""
"Thin layer around the :mod:`bsddb` which provides an :func:`~dbhash.open` "
"function like the other database modules."
msgstr ""
#: ../Doc/library/shelve.rst:199
msgid "Module :mod:`dbm`"
msgstr ""
#: ../Doc/library/shelve.rst:199
msgid "Standard Unix database interface."
msgstr ""
#: ../Doc/library/shelve.rst:202
msgid "Module :mod:`dumbdbm`"
msgstr ""
#: ../Doc/library/shelve.rst:202
msgid "Portable implementation of the ``dbm`` interface."
msgstr ""
#: ../Doc/library/shelve.rst:205
msgid "Module :mod:`gdbm`"
msgstr ""
#: ../Doc/library/shelve.rst:205
msgid "GNU database interface, based on the ``dbm`` interface."
msgstr ""
#: ../Doc/library/shelve.rst:208
msgid "Module :mod:`pickle`"
msgstr ""
#: ../Doc/library/shelve.rst:208
msgid "Object serialization used by :mod:`shelve`."
msgstr ""
#: ../Doc/library/shelve.rst:210
msgid "Module :mod:`cPickle`"
msgstr ""
#: ../Doc/library/shelve.rst:211
msgid "High-performance version of :mod:`pickle`."
msgstr ""