]> granicus.if.org Git - python/commitdiff
Removed spaces before colons and semicolons.
authorSerhiy Storchaka <storchaka@gmail.com>
Tue, 24 Dec 2013 09:04:06 +0000 (11:04 +0200)
committerSerhiy Storchaka <storchaka@gmail.com>
Tue, 24 Dec 2013 09:04:06 +0000 (11:04 +0200)
12 files changed:
Doc/faq/programming.rst
Doc/faq/windows.rst
Doc/howto/logging-cookbook.rst
Doc/howto/urllib2.rst
Doc/library/ctypes.rst
Doc/library/rexec.rst
Doc/library/simplexmlrpcserver.rst
Doc/library/telnetlib.rst
Doc/library/tkinter.rst
Doc/whatsnew/2.4.rst
Doc/whatsnew/2.5.rst
Doc/whatsnew/2.6.rst

index 54dc4b91e436fba8117fec6d7cf2a646668c24ea..c76fa56445cade0c7679a9d259304461418996ca 100644 (file)
@@ -910,7 +910,7 @@ ability, try converting the string to a list or use the array module::
    >>> a = array.array('c', s)
    >>> print a
    array('c', 'Hello, world')
-   >>> a[0] = 'y' ; print a
+   >>> a[0] = 'y'; print a
    array('c', 'yello, world')
    >>> a.tostring()
    'yello, world'
index 7cc6033d70d11539585bb8a0fa59d46f92c09eaf..0379bac20209b6843d35dc32f084d00f6ef27ed4 100644 (file)
@@ -243,7 +243,7 @@ Embedding the Python interpreter in a Windows app can be summarized as follows:
       ...
       Py_Initialize();  // Initialize Python.
       initmyAppc();  // Initialize (import) the helper class.
-      PyRun_SimpleString("import myApp") ;  // Import the shadow class.
+      PyRun_SimpleString("import myApp");  // Import the shadow class.
 
 5. There are two problems with Python's C API which will become apparent if you
    use a compiler other than MSVC, the compiler used to build pythonNN.dll.
index e5d75a64b9b8345328cd764e3825f960a79454f5..50c84e1d6688f25bb2f86c2dffa35041b77fccae 100644 (file)
@@ -834,4 +834,3 @@ When the above script is run, it prints::
 
 Note that the order of items might be different according to the version of
 Python used.
-
index e32c560e978eb98f67751221909a9bd615a80957..d13f174ac253721e1bb875465e15a13e8c745d06 100644 (file)
@@ -18,7 +18,7 @@ Introduction
 .. sidebar:: Related Articles
 
     You may also find useful the following article on fetching web resources
-    with Python :
+    with Python:
 
     * `Basic Authentication <http://www.voidspace.org.uk/python/articles/authentication.shtml>`_
 
@@ -439,7 +439,7 @@ Authentication Tutorial
 
 When authentication is required, the server sends a header (as well as the 401
 error code) requesting authentication.  This specifies the authentication scheme
-and a 'realm'. The header looks like : ``WWW-Authenticate: SCHEME
+and a 'realm'. The header looks like: ``WWW-Authenticate: SCHEME
 realm="REALM"``.
 
 e.g. ::
@@ -511,7 +511,7 @@ the ``ProxyHandler``, which is part of the normal handler chain when a proxy
 setting is detected.  Normally that's a good thing, but there are occasions
 when it may not be helpful [#]_. One way to do this is to setup our own
 ``ProxyHandler``, with no proxies defined. This is done using similar steps to
-setting up a `Basic Authentication`_ handler : ::
+setting up a `Basic Authentication`_ handler: ::
 
     >>> proxy_support = urllib2.ProxyHandler({})
     >>> opener = urllib2.build_opener(proxy_support)
index e09c53eb2a2fce99d7875ecaf3ab02be7932fdc7..2c36e64b98b1945e8352a871ce30faa8efbf6862 100644 (file)
@@ -215,7 +215,7 @@ more about :mod:`ctypes` data types.
 Fundamental data types
 ^^^^^^^^^^^^^^^^^^^^^^
 
-:mod:`ctypes` defines a number of primitive C compatible data types :
+:mod:`ctypes` defines a number of primitive C compatible data types:
 
 +----------------------+------------------------------------------+----------------------------+
 | ctypes type          | C type                                   | Python type                |
index 6b6923c34af22c7162a75044385d8bdfd08c8152..12f6faa38a88f9699580ece95bb5a965d8fdbbfe 100644 (file)
@@ -270,7 +270,7 @@ Let us say that we want a slightly more relaxed policy than the standard
            if mode in ('r', 'rb'):
                pass
            elif mode in ('w', 'wb', 'a', 'ab'):
-               # check filename : must begin with /tmp/
+               # check filename: must begin with /tmp/
                if file[:5]!='/tmp/':
                    raise IOError("can't write outside /tmp")
                elif (string.find(file, '/../') >= 0 or
index 62139c492198de2699154c078ee1e41577bd75e1..1dc68179c7696e21bfb47f5cc33617106207faaa 100644 (file)
@@ -247,7 +247,7 @@ requests sent to Python CGI scripts.
 Example::
 
    class MyFuncs:
-       def div(self, x, y) : return x // y
+       def div(self, x, y): return x // y
 
 
    handler = CGIXMLRPCRequestHandler()
index ff7379600f7c2e3b690e4ac367ebfb1490bd58f3..a3019f5fc3c951950f396cdc64bb2e510f3dfce0 100644 (file)
@@ -208,7 +208,7 @@ Telnet Objects
 .. method:: Telnet.set_option_negotiation_callback(callback)
 
    Each time a telnet option is read on the input flow, this *callback* (if set) is
-   called with the following parameters : callback(telnet socket, command
+   called with the following parameters: callback(telnet socket, command
    (DO/DONT/WILL/WONT), option).  No other action is done afterwards by telnetlib.
 
 
index 3d40c7746e63856d1ca28e209229dfeda5c66d9d..f2a419dc156ccaf68a33d1de828c1ac40f6a338b 100644 (file)
@@ -452,7 +452,7 @@ back will contain the name of the synonym and the "real" option (such as
 Example::
 
    >>> print fred.config()
-   {'relief' : ('relief', 'relief', 'Relief', 'raised', 'groove')}
+   {'relief': ('relief', 'relief', 'Relief', 'raised', 'groove')}
 
 Of course, the dictionary printed will include all the options available and
 their values.  This is meant only as an example.
index e9677ac14bb87fe525a9fca4ced4ffbe045cbc51..fa6c124abc9470b4d834add6fb44389ac6c8cbbb 100644 (file)
@@ -846,7 +846,7 @@ Here are all of the changes that Python 2.4 makes to the core Python language.
      ['A', 'b', 'c', 'D']
 
   Finally, the *reverse* parameter takes a Boolean value.  If the value is true,
-  the list will be sorted into reverse order. Instead of ``L.sort() ;
+  the list will be sorted into reverse order. Instead of ``L.sort();
   L.reverse()``, you can now write ``L.sort(reverse=True)``.
 
   The results of sorting are now guaranteed to be stable.  This means that two
index e059cd50a33d4531ceba87e348e092115fbc268f..c420a19fc72ba29131b2abd4a5ba85437562e144 100644 (file)
@@ -286,7 +286,7 @@ Python's standard :mod:`string` module?  There's no clean way to ignore
 :mod:`pkg.string` and look for the standard module; generally you had to look at
 the contents of ``sys.modules``, which is slightly unclean.    Holger Krekel's
 :mod:`py.std` package provides a tidier way to perform imports from the standard
-library, ``import py ; py.std.string.join()``, but that package isn't available
+library, ``import py; py.std.string.join()``, but that package isn't available
 on all Python installations.
 
 Reading code which relies on relative imports is also less clear, because a
index 28932a6277e8ee237487288fd99a414cd19d9c7f..cefdcaf57741fa3b912b430a2d91177bd34b813a 100644 (file)
@@ -1887,7 +1887,7 @@ changes, or look through the Subversion logs for all the details.
     >>> dq=deque(maxlen=3)
     >>> dq
     deque([], maxlen=3)
-    >>> dq.append(1) ; dq.append(2) ; dq.append(3)
+    >>> dq.append(1); dq.append(2); dq.append(3)
     >>> dq
     deque([1, 2, 3], maxlen=3)
     >>> dq.append(4)
@@ -2779,12 +2779,12 @@ http://www.json.org.
 types. The following example encodes and decodes a dictionary::
 
        >>> import json
-       >>> data = {"spam" : "foo", "parrot" : 42}
+       >>> data = {"spam": "foo", "parrot": 42}
        >>> in_json = json.dumps(data) # Encode the data
        >>> in_json
        '{"parrot": 42, "spam": "foo"}'
        >>> json.loads(in_json) # Decode into a Python object
-       {"spam" : "foo", "parrot" : 42}
+       {"spam": "foo", "parrot": 42}
 
 It's also possible to write your own decoders and encoders to support
 more types. Pretty-printing of the JSON strings is also supported.