From 564c4eac715dfe9f18232a65ac74115493a89d2e Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Sun, 23 Jun 2013 00:21:22 -0400 Subject: [PATCH] 2.5ism --- lib/sqlalchemy/dialects/postgresql/constraints.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/sqlalchemy/dialects/postgresql/constraints.py b/lib/sqlalchemy/dialects/postgresql/constraints.py index 5b8bbe6430..c6ccff0bdb 100644 --- a/lib/sqlalchemy/dialects/postgresql/constraints.py +++ b/lib/sqlalchemy/dialects/postgresql/constraints.py @@ -39,7 +39,7 @@ class ExcludeConstraint(ColumnCollectionConstraint): :param using: Optional string. If set, emit USING when issuing DDL for this constraint. Defaults to 'gist'. - + :param where: Optional string. If set, emit WHERE 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 -- 2.47.3