On Jul 30, 2007, at 3:41 PM, Jonathan LaCour wrote:
> > Michael Bayer wrote: > >> both of your before_update() functions return EXT_PASS. theyll >> both be >> called. > > Well, yeah. I just found it a little bit odd that I had to do this. > When I saw EXT_PASS, I didn't think it meant "continue along with > other > mapper extensions." It seems like a bad idea for one mapper extension > to be able to inject itself into the front of the extensions list and > then cause all other mapper extensions to not execute by returning > something other than EXT_PASS. > > So, I guess it was less of a problem, and more of me raising a > point of > confusion and wondering if that part of the API couldn't be > smoothed out > a bit :) its a model taken from the way event loops usually work; any consumer along the event chain is allowed to say, "ive consumed the event" and stop further handlers from dealing with it. we can certainly change the names around into something less ridiculous. unfortuantely, changing it so that "no" return value, or None, does *not* short circuit the chain runs a slight risk that someone is actually using it that way. So we might need to change it such that if your before_insert returns None, an error is raised, and youre forced to return a specific value indicating the next activity...otherwise someone's upgrade might silently fail. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---