]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
2.5ism
authorMike Bayer <mike_mp@zzzcomputing.com>
Sun, 23 Jun 2013 04:21:22 +0000 (00:21 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sun, 23 Jun 2013 04:21:22 +0000 (00:21 -0400)
lib/sqlalchemy/dialects/postgresql/constraints.py

index 5b8bbe64303a7340617dad3f6bfefe685ee93cd3..c6ccff0bdbef8099707f94bddeeef95faa943b3a 100644 (file)
@@ -39,7 +39,7 @@ class ExcludeConstraint(ColumnCollectionConstraint):
         :param using:
           Optional string.  If set, emit USING <index_method> when issuing DDL
           for this constraint. Defaults to 'gist'.
-          
+
         :param where:
           Optional string.  If set, emit WHERE <predicate> when issuing DDL
           for this constraint.
@@ -47,10 +47,10 @@ class ExcludeConstraint(ColumnCollectionConstraint):
         """
         ColumnCollectionConstraint.__init__(
             self,
-            *[col for col, op in elements],
             name=kw.get('name'),
             deferrable=kw.get('deferrable'),
-            initially=kw.get('initially')
+            initially=kw.get('initially'),
+            *[col for col, op in elements]
             )
         self.operators = {}
         for col_or_string, op in elements:
@@ -60,14 +60,14 @@ class ExcludeConstraint(ColumnCollectionConstraint):
         where = kw.get('where')
         if where:
             self.where =  expression._literal_as_text(where)
-            
+
     def copy(self, **kw):
         elements = [(col, self.operators[col])
                     for col in self.columns.keys()]
-        c = self.__class__(*elements,
-                            name=self.name,
+        c = self.__class__(name=self.name,
                             deferrable=self.deferrable,
-                            initially=self.initially)
+                            initially=self.initially,
+                            *elements)
         c.dispatch._update(self.dispatch)
         return c