From da27263b4a7aa6af7d2bf6967a15b0007aa1ae2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Wed, 5 Oct 2011 01:17:38 +0200 Subject: Move doc of sys.dont_write_bytecode to make all attributes sorted again --- Doc/library/sys.rst | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Doc/library/sys.rst b/Doc/library/sys.rst index 7f3d827..105f716 100644 --- a/Doc/library/sys.rst +++ b/Doc/library/sys.rst @@ -121,6 +121,15 @@ always available. Use ``'backslashreplace'`` error handler on :exc:`UnicodeEncodeError`. +.. data:: dont_write_bytecode + + If this is true, Python won't try to write ``.pyc`` or ``.pyo`` files on the + import of source modules. This value is initially set to ``True`` or + ``False`` depending on the :option:`-B` command line option and the + :envvar:`PYTHONDONTWRITEBYTECODE` environment variable, but you can set it + yourself to control bytecode file generation. + + .. function:: excepthook(type, value, traceback) This function prints out a given traceback and exception to ``sys.stderr``. @@ -764,15 +773,6 @@ always available. implement a dynamic prompt. -.. data:: dont_write_bytecode - - If this is true, Python won't try to write ``.pyc`` or ``.pyo`` files on the - import of source modules. This value is initially set to ``True`` or ``False`` - depending on the ``-B`` command line option and the ``PYTHONDONTWRITEBYTECODE`` - environment variable, but you can set it yourself to control bytecode file - generation. - - .. function:: setcheckinterval(interval) Set the interpreter's "check interval". This integer value determines how often -- cgit v0.12 From 58a9153c9f49fcfe58a9e91b08167ff3483b36f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Wed, 5 Oct 2011 01:28:24 +0200 Subject: Fix markup used in the documentation of sys.prefix and sys.exec_prefix. - Using the file role with {placeholders} is IMO clearer than fake Python code. - The fact that sys.version[:3] gives '3.2' is a CPython detail and should not be advertised (see #9442), even if some stdlib modules currently rely on that detail. --- Doc/library/sys.rst | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Doc/library/sys.rst b/Doc/library/sys.rst index 105f716..fdf188f 100644 --- a/Doc/library/sys.rst +++ b/Doc/library/sys.rst @@ -194,10 +194,10 @@ always available. Python files are installed; by default, this is also ``'/usr/local'``. This can be set at build time with the ``--exec-prefix`` argument to the :program:`configure` script. Specifically, all configuration files (e.g. the - :file:`pyconfig.h` header file) are installed in the directory ``exec_prefix + - '/lib/pythonversion/config'``, and shared library modules are installed in - ``exec_prefix + '/lib/pythonversion/lib-dynload'``, where *version* is equal to - ``version[:3]``. + :file:`pyconfig.h` header file) are installed in the directory + :file:`{exec_prefix}/lib/python{X.Y}/config', and shared library modules are + installed in :file:`{exec_prefix}/lib/python{X.Y}/lib-dynload`, where *X.Y* + is the version number of Python, for example ``3.2``. .. data:: executable @@ -752,10 +752,10 @@ always available. independent Python files are installed; by default, this is the string ``'/usr/local'``. This can be set at build time with the ``--prefix`` argument to the :program:`configure` script. The main collection of Python - library modules is installed in the directory ``prefix + '/lib/pythonversion'`` + library modules is installed in the directory :file:`{prefix}/lib/python{X.Y}`` while the platform independent header files (all except :file:`pyconfig.h`) are - stored in ``prefix + '/include/pythonversion'``, where *version* is equal to - ``version[:3]``. + stored in :file:`{prefix}/include/python{X.Y}``, where *X.Y* is the version + number of Python, for example ``3.2``. .. data:: ps1 -- cgit v0.12 From 63ba97b58608163e1fabf0e07c4f7a243a028e15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Wed, 5 Oct 2011 01:29:22 +0200 Subject: Fix typo and case in a recently added test --- Lib/test/test_minidom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/test/test_minidom.py b/Lib/test/test_minidom.py index 5c09c46..126bdb1 100644 --- a/Lib/test/test_minidom.py +++ b/Lib/test/test_minidom.py @@ -446,7 +446,7 @@ class MinidomTest(unittest.TestCase): dom.unlink() self.confirm(domstr == str.replace("\n", "\r\n")) - def test_toPrettyXML_perserves_content_of_text_node(self): + def test_toprettyxml_preserves_content_of_text_node(self): str = 'B' dom = parseString(str) dom2 = parseString(dom.toprettyxml()) -- cgit v0.12