Skip to content

Commit

Permalink
Update documentation to Python 3.
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Howitz committed Apr 24, 2019
1 parent 2466df0 commit 3c4f527
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions docs/using.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ The examples below use a stub data manager class, and its stub cache class:
... self._mru = []
... def mru(self, oid):
... self._mru.append(oid)
>>> from zope.interface import implements
>>> from zope.interface import implementer
>>> from persistent.interfaces import IPersistentDataManager
>>> class DM(object):
... implements(IPersistentDataManager)
>>> @implementer(IPersistentDataManager)
... class DM(object):
... def __init__(self):
... self._cache = Cache()
... self.registered = 0
Expand Down Expand Up @@ -117,7 +117,7 @@ it has not yet been assigned, its value is ``None``:

.. doctest::

>>> print p._p_jar
>>> print(p._p_jar)
None

The :attr:`_p_oid` attribute is the :term:`object id`, a unique value
Expand All @@ -126,7 +126,7 @@ has not yet been associated with its :term:`jar`, its value is ``None``:

.. doctest::

>>> print p._p_oid
>>> print(p._p_oid)
None

Without a data manager, modifying a persistent object has no effect on
Expand Down Expand Up @@ -376,10 +376,10 @@ The ``_p_serial`` attribute is not affected by calling setstate.

.. doctest::

>>> p._p_serial = "00000012"
>>> p._p_serial = b"00000012"
>>> p.__setstate__(p.__getstate__())
>>> p._p_serial
'00000012'
b'00000012'


Estimated Object Size
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ deps =

[testenv:docs]
basepython =
python2.7
python3.6
commands =
sphinx-build -b html -d docs/_build/doctrees docs docs/_build/html
sphinx-build -b doctest -d docs/_build/doctrees docs docs/_build/doctest
Expand Down

0 comments on commit 3c4f527

Please sign in to comment.