[Python-checkins] r59537 - python/trunk/Doc/whatsnew/2.6.rst

georg.brandl python-checkins at python.org
Mon Dec 17 00:13:29 CET 2007


Author: georg.brandl
Date: Mon Dec 17 00:13:29 2007
New Revision: 59537

Modified:
   python/trunk/Doc/whatsnew/2.6.rst
Log:
Use PEP 8.


Modified: python/trunk/Doc/whatsnew/2.6.rst
==============================================================================
--- python/trunk/Doc/whatsnew/2.6.rst	(original)
+++ python/trunk/Doc/whatsnew/2.6.rst	Mon Dec 17 00:13:29 2007
@@ -242,11 +242,11 @@
 
    class DatabaseConnection:
        # Database interface
-       def cursor (self):
+       def cursor(self):
            "Returns a cursor object and starts a new transaction"
-       def commit (self):
+       def commit(self):
            "Commits current transaction"
-       def rollback (self):
+       def rollback(self):
            "Rolls back current transaction"
 
 The :meth:`__enter__` method is pretty easy, having only to start a new
@@ -256,7 +256,7 @@
 
    class DatabaseConnection:
        ...
-       def __enter__ (self):
+       def __enter__(self):
            # Code to start a new transaction
            cursor = self.cursor()
            return cursor
@@ -273,7 +273,7 @@
 
    class DatabaseConnection:
        ...
-       def __exit__ (self, type, value, tb):
+       def __exit__(self, type, value, tb):
            if tb is None:
                # No exception, so commit
                self.commit()
@@ -306,7 +306,7 @@
    from contextlib import contextmanager
 
    @contextmanager
-   def db_transaction (connection):
+   def db_transaction(connection):
        cursor = connection.cursor()
        try:
            yield cursor


More information about the Python-checkins mailing list