summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
Diffstat (limited to 'Objects')
-rw-r--r--Objects/classobject.c4
-rw-r--r--Objects/dictobject.c2
-rw-r--r--Objects/intobject.c2
-rw-r--r--Objects/object.c2
-rw-r--r--Objects/stringobject.c10
-rw-r--r--Objects/unicodeobject.c4
6 files changed, 12 insertions, 12 deletions
diff --git a/Objects/classobject.c b/Objects/classobject.c
index 3643ce9..d1eb451 100644
--- a/Objects/classobject.c
+++ b/Objects/classobject.c
@@ -1077,7 +1077,7 @@ static int instance_contains(PyInstanceObject *inst, PyObject *member)
}
func = instance_getattr(inst, __contains__);
if(func == NULL) {
- /* fall back to previous behaviour */
+ /* fall back to previous behavior */
int i, cmp_res;
if(!PyErr_ExceptionMatches(PyExc_AttributeError))
@@ -1160,7 +1160,7 @@ PyInstance_DoBinOp(PyObject *v, PyObject *w, char *opname, char *ropname,
return result;
if (halfbinop(w, v, ropname, &result, thisfunc, 1) <= 0)
return result;
- /* Sigh -- special case for comnparisons */
+ /* Sigh -- special case for comparisons */
if (strcmp(opname, "__cmp__") == 0) {
long c = (v < w) ? -1 : (v > w) ? 1 : 0;
return PyInt_FromLong(c);
diff --git a/Objects/dictobject.c b/Objects/dictobject.c
index 76417b9..819fadd 100644
--- a/Objects/dictobject.c
+++ b/Objects/dictobject.c
@@ -185,7 +185,7 @@ lookdict(dictobject *mp, PyObject *key, register long hash)
/* Cycle through GF(2^n)-{0} */
incr = incr << 1;
if (incr > mask)
- incr ^= mp->ma_poly; /* This will implicitely clear
+ incr ^= mp->ma_poly; /* This will implicitly clear
the highest bit */
}
}
diff --git a/Objects/intobject.c b/Objects/intobject.c
index 022c298..20bb370 100644
--- a/Objects/intobject.c
+++ b/Objects/intobject.c
@@ -311,7 +311,7 @@ int_sub(PyIntObject *v, PyIntObject *w)
/*
Integer overflow checking used to be done using a double, but on 64
bit machines (where both long and double are 64 bit) this fails
-because the double doesn't have enouvg precision. John Tromp suggests
+because the double doesn't have enough precision. John Tromp suggests
the following algorithm:
Suppose again we normalize a and b to be nonnegative.
diff --git a/Objects/object.c b/Objects/object.c
index 64d8a82..ef3455e 100644
--- a/Objects/object.c
+++ b/Objects/object.c
@@ -337,7 +337,7 @@ do_cmp(PyObject *v, PyObject *w)
PyObject *_PyCompareState_Key;
-/* _PyCompareState_nesting is incremented beforing call compare (for
+/* _PyCompareState_nesting is incremented before calling compare (for
some types) and decremented on exit. If the count exceeds the
nesting limit, enable code to detect circular data structures.
*/
diff --git a/Objects/stringobject.c b/Objects/stringobject.c
index ab44e91..80b9def 100644
--- a/Objects/stringobject.c
+++ b/Objects/stringobject.c
@@ -283,7 +283,7 @@ string_print(PyStringObject *op, FILE *fp, int flags)
return 0;
}
- /* figure out which quote to use; single is prefered */
+ /* figure out which quote to use; single is preferred */
quote = '\'';
if (strchr(op->ob_sval, '\'') && !strchr(op->ob_sval, '"'))
quote = '"';
@@ -321,7 +321,7 @@ string_repr(register PyStringObject *op)
register char *p;
int quote;
- /* figure out which quote to use; single is prefered */
+ /* figure out which quote to use; single is preferred */
quote = '\'';
if (strchr(op->ob_sval, '\'') && !strchr(op->ob_sval, '"'))
quote = '"';
@@ -1416,10 +1416,10 @@ mymemcnt(const char *mem, int len, const char *pat, int pat_len)
/*
mymemreplace
- Return a string in which all occurences of PAT in memory STR are
+ Return a string in which all occurrences of PAT in memory STR are
replaced with SUB.
- If length of PAT is less than length of STR or there are no occurences
+ If length of PAT is less than length of STR or there are no occurrences
of PAT in STR, then the original string is returned. Otherwise, a new
string is allocated here and returned.
@@ -1689,7 +1689,7 @@ string_expandtabs(PyStringObject *self, PyObject *args)
if (!PyArg_ParseTuple(args, "|i:expandtabs", &tabsize))
return NULL;
- /* First pass: determine size of ouput string */
+ /* First pass: determine size of output string */
i = j = 0;
e = PyString_AS_STRING(self) + PyString_GET_SIZE(self);
for (p = PyString_AS_STRING(self); p < e; p++)
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index 02d1b0d..12c5be4 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -3198,7 +3198,7 @@ int PyUnicode_Compare(PyObject *left,
if (v == NULL)
goto onError;
- /* Shortcut for emtpy or interned objects */
+ /* Shortcut for empty or interned objects */
if (v == u) {
Py_DECREF(u);
Py_DECREF(v);
@@ -3385,7 +3385,7 @@ unicode_expandtabs(PyUnicodeObject *self, PyObject *args)
if (!PyArg_ParseTuple(args, "|i:expandtabs", &tabsize))
return NULL;
- /* First pass: determine size of ouput string */
+ /* First pass: determine size of output string */
i = j = 0;
e = self->str + self->length;
for (p = self->str; p < e; p++)