[Checkins] SVN: z3c.sqlalchemy/trunk/src/z3c/sqlalchemy/base.py cleaned up default values of the constructor

Andreas Jung andreas at andreas-jung.com
Mon Jan 7 14:49:55 EST 2008


Log message for revision 82737:
  cleaned up default values of the constructor
  

Changed:
  U   z3c.sqlalchemy/trunk/src/z3c/sqlalchemy/base.py

-=-
Modified: z3c.sqlalchemy/trunk/src/z3c/sqlalchemy/base.py
===================================================================
--- z3c.sqlalchemy/trunk/src/z3c/sqlalchemy/base.py	2008-01-07 18:17:18 UTC (rev 82736)
+++ z3c.sqlalchemy/trunk/src/z3c/sqlalchemy/base.py	2008-01-07 19:49:54 UTC (rev 82737)
@@ -54,7 +54,7 @@
 
     implements(ISQLAlchemyWrapper)
 
-    def __init__(self, dsn, model=None, transactional=True, engine_options=None, session_options=None, **kw):
+    def __init__(self, dsn, model=None, transactional=True, engine_options={}, session_options={}, **kw):
         """ 'dsn' - a RFC-1738-style connection string
 
             'model' - optional instance of model.Model
@@ -77,9 +77,9 @@
         self.drivername = self.url.drivername
         self.transactional = transactional
         self.echo = kw.get('echo', False)
-        self.engine_options = engine_options or {}
+        self.engine_options = engine_options
         self.engine_options.update(echo=self.echo)
-        self.session_options = session_options or {}
+        self.session_options = session_options
         self._model = None
         self._createEngine()
         self._id = str(random.random()) # used as unique key for session/connection cache



More information about the Checkins mailing list