Re: [sqlalchemy] Passing additional arguments to event listeners ?

2011-12-01 Thread Tate Kim
:44:26 To: sqlalchemy@googlegroups.com Reply-To: sqlalchemy@googlegroups.com Subject: RE: [sqlalchemy] Passing additional arguments to event listeners ? Not sure if this helps or not, but how about using a lambda that that calls your function with the arguments you want? This is the solution I

RE: [sqlalchemy] Passing additional arguments to event listeners ?

2011-12-01 Thread Jackson, Cameron
backs -Original Message- From: sqlalchemy@googlegroups.com [mailto:sqlalchemy@googlegroups.com] On Behalf Of Tate Kim Sent: Friday, 2 December 2011 12:33 PM To: sqlalchemy@googlegroups.com Subject: Re: [sqlalchemy] Passing additional arguments to event listeners ? How about functools.pa

Re: [sqlalchemy] Passing additional arguments to event listeners ?

2011-12-01 Thread Tate Kim
, 1 Dec 2011 19:52:15 To: Reply-To: sqlalchemy@googlegroups.com Subject: Re: [sqlalchemy] Passing additional arguments to event listeners ? On Dec 1, 2011, at 7:24 PM, Łukasz Czuja wrote: > Hi, > > I do not see anywhere in the docs a way to pass custom attributes to > eve

Re: [sqlalchemy] Passing additional arguments to event listeners ?

2011-12-01 Thread Michael Bayer
On Dec 1, 2011, at 7:24 PM, Łukasz Czuja wrote: > Hi, > > I do not see anywhere in the docs a way to pass custom attributes to > event listeners: > > event.listen(cls, 'before_insert', before_insert_listener, arg1, arg2, > kwarg1 = 'value', kwarg2 = 'value2') > > so that the before_insert_list

[sqlalchemy] Passing additional arguments to event listeners ?

2011-12-01 Thread Łukasz Czuja
Hi, I do not see anywhere in the docs a way to pass custom attributes to event listeners: event.listen(cls, 'before_insert', before_insert_listener, arg1, arg2, kwarg1 = 'value', kwarg2 = 'value2') so that the before_insert_listener can have mixed signature: def before_insert_listener(mapper, c