diff options
author | Martin Panter <vadmium+py@gmail.com> | 2017-01-14 08:24:20 (GMT) |
---|---|---|
committer | Martin Panter <vadmium+py@gmail.com> | 2017-01-14 08:24:20 (GMT) |
commit | 8f1378366e9fc0d7f22fda302f04bf822ae34cc1 (patch) | |
tree | f213d643e990d5763f33959a00fa8e5f0bcc731a /Doc/whatsnew/2.1.rst | |
parent | 536d70ed331c3192578b73b2b243bc1dbbd8ec2a (diff) | |
download | cpython-8f1378366e9fc0d7f22fda302f04bf822ae34cc1.zip cpython-8f1378366e9fc0d7f22fda302f04bf822ae34cc1.tar.gz cpython-8f1378366e9fc0d7f22fda302f04bf822ae34cc1.tar.bz2 |
Avoid line breaks after hyphens, otherwise they are turned into spaces
Diffstat (limited to 'Doc/whatsnew/2.1.rst')
-rw-r--r-- | Doc/whatsnew/2.1.rst | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Doc/whatsnew/2.1.rst b/Doc/whatsnew/2.1.rst index 00151d7..ad4c6d5 100644 --- a/Doc/whatsnew/2.1.rst +++ b/Doc/whatsnew/2.1.rst @@ -159,8 +159,8 @@ precede any statement that will result in bytecodes being produced. PEP 207: Rich Comparisons ========================= -In earlier versions, Python's support for implementing comparisons on user- -defined classes and extension types was quite simple. Classes could implement a +In earlier versions, Python's support for implementing comparisons on user-defined +classes and extension types was quite simple. Classes could implement a :meth:`__cmp__` method that was given two instances of a class, and could only return 0 if they were equal or +1 or -1 if they weren't; the method couldn't raise an exception or return anything other than a Boolean value. Users of @@ -465,11 +465,11 @@ Windows being the primary examples; on these systems, it's impossible to distinguish the filenames ``FILE.PY`` and ``file.py``, even though they do store the file's name in its original case (they're case-preserving, too). -In Python 2.1, the :keyword:`import` statement will work to simulate case- -sensitivity on case-insensitive platforms. Python will now search for the first +In Python 2.1, the :keyword:`import` statement will work to simulate case-sensitivity +on case-insensitive platforms. Python will now search for the first case-sensitive match by default, raising an :exc:`ImportError` if no such file -is found, so ``import file`` will not import a module named ``FILE.PY``. Case- -insensitive matching can be requested by setting the :envvar:`PYTHONCASEOK` +is found, so ``import file`` will not import a module named ``FILE.PY``. +Case-insensitive matching can be requested by setting the :envvar:`PYTHONCASEOK` environment variable before starting the Python interpreter. .. ====================================================================== @@ -481,8 +481,8 @@ PEP 217: Interactive Display Hook When using the Python interpreter interactively, the output of commands is displayed using the built-in :func:`repr` function. In Python 2.1, the variable :func:`sys.displayhook` can be set to a callable object which will be called -instead of :func:`repr`. For example, you can set it to a special pretty- -printing function:: +instead of :func:`repr`. For example, you can set it to a special +pretty-printing function:: >>> # Create a recursive data structure ... L = [1,2,3] |