[Python-checkins] peps: Fix typos and tweak the return value of dict_get_version(d)

berker.peksag python-checkins at python.org
Sun Mar 27 16:00:40 EDT 2016


https://hg.python.org/peps/rev/29731d35627d
changeset:   6269:29731d35627d
user:        Berker Peksag <berker.peksag at gmail.com>
date:        Sun Mar 27 22:52:25 2016 +0300
summary:
  Fix typos and tweak the return value of dict_get_version(d)

files:
  pep-0509.txt |  12 ++++++------
  pep-0510.txt |   4 ++--
  2 files changed, 8 insertions(+), 8 deletions(-)


diff --git a/pep-0509.txt b/pep-0509.txt
--- a/pep-0509.txt
+++ b/pep-0509.txt
@@ -179,7 +179,7 @@
 If a dictionary is created with items, the version is also incremented
 at each dictionary insertion. Example::
 
-    >>> d=dict(x=7, y=33)
+    >>> d = dict(x=7, y=33)
     >>> dict_get_version(d)
     2
 
@@ -188,14 +188,14 @@
 ``new_value is old_value``, not by their content:
 ``new_value == old_value``. Example::
 
-    >>> d={}
+    >>> d = {}
     >>> value = object()
     >>> d['key'] = value
     >>> dict_get_version(d)
-    2
+    1
     >>> d['key'] = value
     >>> dict_get_version(d)
-    2
+    1
 
 .. note::
    CPython uses some singleton like integers in the range [-5; 257],
@@ -233,7 +233,7 @@
 After an integer overflow, a guard can succeed whereas the watched
 dictionary key was modified. The bug occurs if the dictionary is
 modified at least ``2 ** 64`` times between two checks of the guard and
-if the new version (theorical value with no integer overflow) is equal
+if the new version (theoretical value with no integer overflow) is equal
 to the old version modulo ``2 ** 64``.
 
 If a dictionary is modified each nanosecond, an overflow takes longer
@@ -373,7 +373,7 @@
   ``PyObject_xxx()`` if the object is a ``dict`` subtype
 * ``PyDict_CheckExact()`` check fails on ``dict`` subtype, whereas some
   functions require the exact ``dict`` type.
-* ``Python/ceval.c`` does not completly supports dict subtypes for
+* ``Python/ceval.c`` does not completely supports dict subtypes for
   namespaces
 
 
diff --git a/pep-0510.txt b/pep-0510.txt
--- a/pep-0510.txt
+++ b/pep-0510.txt
@@ -77,7 +77,7 @@
 Even if PyPy has a very good compatibility with Python, some modules are
 still not compatible with PyPy: see `PyPy Compatibility Wiki
 <https://bitbucket.org/pypy/compatibility/wiki/Home>`_. The incomplete
-support of the the Python C API is part of this problem. There are also
+support of the Python C API is part of this problem. There are also
 subtle differences between PyPy and CPython like reference counting:
 object destructors are always called in PyPy, but can be called "later"
 than in CPython. Using context managers helps to control when resources
@@ -393,7 +393,7 @@
 
     int PyFunction_RemoveSpecialized(PyObject *func, Py_ssize_t index)
 
-Return ``0`` on sucess or if the index does not exist. Raise an exception and
+Return ``0`` on success or if the index does not exist. Raise an exception and
 return ``-1`` on error.
 
 

-- 
Repository URL: https://hg.python.org/peps


More information about the Python-checkins mailing list