[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.


--~--~---------~--~----~------------~-------~--~----~
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