On Monday 20 August 2007 17:29:52 jason kirtland wrote:
> [EMAIL PROTECTED] wrote:
> > hi
> > i need to have a list collection with list.appender (in SA 0.4
> > terms) that accepts either one positional arg as the value, or
> > keyword args which it uses to create the value. Each collection
> > instance knows what type of values to create.
> >
>  > [...]
>  > Any idea to fix/enhance this, letting **kwargs through to my
>  > function? The dynamic wrapper() can do this, while these preset
>  > ones cannot... while they should be equaly powerful.
>
> Hi Svil,
>
> @collections.appender
> @collections.internally_instrumented
> def append(self, obj=_NOTSET, **kargs):
>    ...
>
> > There are 2 (different) uses of an appender, one is the SA
> > itself, but the other is the programmer. SA will always use
> > single
> > arg/positionals, while i could use this or that or combination.
>
> SQLAlchemy's appender doesn't have to be the programmer's appender.
>  You can add a method solely for the orm's use if you like.  That's
> one of the points of the decorator syntax, divorcing function names
> from the interface.  If you want to keep 'append' for your own use,
> just tag another method as the @appender.
thanks for suggestion. 

This would work if the default decorators were not force wrapped 
anyway, in that "ABC decoration" part. i'm looking now to see why is 
it so. 

And anyway i need to first create the object and just then append it 
(the decorators will first fire event on the object and just then 
append(), that is call me), so may have to look further/deeper. 
Maybe i can make my append create objects first and then call the 
actual appender - so yes, this is the way.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to