The :class:`OrderedDict` constructor and :meth:`update` method both accept
keyword arguments, but their order is lost because Python's function call
-semantics pass-in keyword arguments using a regular unordered dictionary.
+semantics pass in keyword arguments using a regular unordered dictionary.
:class:`OrderedDict` Examples and Recipes
The :mod:`test` package can be run as a script to drive Python's regression
test suite, thanks to the :option:`-m` option: :program:`python -m test`. Under
the hood, it uses :mod:`test.regrtest`; the call :program:`python -m
-test.regrtest` used in previous Python versions still works). Running the
+test.regrtest` used in previous Python versions still works. Running the
script by itself automatically starts running all regression tests in the
:mod:`test` package. It does this by finding all modules in the package whose
name starts with ``test_``, importing them, and executing the function
def _url_collapse_path(path):
"""
Given a URL path, remove extra '/'s and '.' path elements and collapse
- any '..' references and returns a colllapsed path.
+ any '..' references and returns a collapsed path.
Implements something akin to RFC-2396 5.2 step 6 to parse relative paths.
The utility of this function is limited to is_cgi method and helps
- Issue #7895: platform.mac_ver() no longer crashes after calling os.fork().
-- Issue #9323: Fixed a bug in trace.py that resulted in loosing the name of the
+- Issue #9323: Fixed a bug in trace.py that resulted in losing the name of the
script being traced. Patch by Eli Bendersky.
- Issue #9282: Fixed --listfuncs option of trace.py. Thanks Eli Bendersky for
engine friendly) error messages when "exec" and "print" are used as
statements.
-- Issue #21642: If the conditional if-else expression, allow an integer written
+- Issue #21642: In the conditional if-else expression, allow an integer written
with no space between itself and the ``else`` keyword (e.g. ``True if 42else
False``) to be valid syntax.
/* If newline == "", we don't translate anything.
If newline == "\n" or newline == None, we translate to "\n", which is
a no-op.
- (for newline == None, TextIOWrapper translates to os.sepline, but it
+ (for newline == None, TextIOWrapper translates to os.linesep, but it
is pointless for StringIO)
*/
if (newline != NULL && newline[0] == '\r') {
#ifdef Py_DEBUG
/* PyObject_Repr() must not be called with an exception set,
because it may clear it (directly or indirectly) and so the
- caller looses its exception */
+ caller loses its exception */
assert(!PyErr_Occurred());
#endif
#ifdef Py_DEBUG
/* type_call() must not be called with an exception set,
because it may clear it (directly or indirectly) and so the
- caller looses its exception */
+ caller loses its exception */
assert(!PyErr_Occurred());
#endif
* modules for all processes (not just the python[_d].exe ones)
* and see if any of our DLLs are loaded (i.e. python34[_d].dll),
* as that would also inhibit our ability to rebuild the solution.
- * Not worth loosing sleep over though; for now, a simple check
+ * Not worth losing sleep over though; for now, a simple check
* for just the python executable should be sufficient.
*/
* modules for all processes (not just the python[_d].exe ones)
* and see if any of our DLLs are loaded (i.e. python34[_d].dll),
* as that would also inhibit our ability to rebuild the solution.
- * Not worth loosing sleep over though; for now, a simple check
+ * Not worth losing sleep over though; for now, a simple check
* for just the python executable should be sufficient.
*/
#ifdef Py_DEBUG
/* PyEval_EvalFrameEx() must not be called with an exception set,
because it may clear it (directly or indirectly) and so the
- caller looses its exception */
+ caller loses its exception */
assert(!PyErr_Occurred());
#endif
#ifdef Py_DEBUG
/* PyEval_CallObjectWithKeywords() must not be called with an exception
set, because it may clear it (directly or indirectly)
- and so the caller looses its exception */
+ and so the caller loses its exception */
assert(!PyErr_Occurred());
#endif