Jim Fulton wrote:
> On Jun 25, 2007, at 4:51 PM, Robert Brewer wrote:
>
> > Benji York wrote:
> >> Robert Brewer wrote:
> >>> I'd like to continue talking about
standardization on
> >> site-wide process
> >>> state and services.
> >>
> >> Perhaps zope.event would be a good fit.
> >> http://svn.zope.org/zope.event/trunk/src/zope/even
t/README.txt
> >> ?view=markup
> >
> > All 4 lines of it? ;)
> >
> > subscribers = []
> >
> > def notify(event):
> > for subscriber in subscribers:
> > subscriber(event)
> >
> > Seriously, though, this handles the notification
but not the state
> > machine, which I think is critical to the effort.
It also doesn't
> > do any
> > error-handling for misbehaving subscribers, so not
all
> subscribers are
> > guaranteed to run if there's an unhandled error in
an earlier
> > subscriber. It also sends all events to all
subscribers, instead of
> > partitioning the subscribers.
>
> Right. You need a dispatching layer behind this. The
beauty of
> zope.event is that it puts very little requirement on
people who
> publish events.
>
> > And finally, I don't want "import
> > zope.event" in my framework.
>
> Why? I have no a-priori objection to importing
something that has
> cherrypy in its name.
Because CP has 0 dependencies outside the stdlib right now,
and adding
one when you have none is a lot more work (for us and our
users) than
adding one when you already have one or more. Making that
jump for four
lines of code seems excessive.
Robert Brewer
System Architect
Amor Ministries
fumanchu amor.org
_______________________________________________
Web-SIG mailing list
Web-SIG python.org
Web SIG: http://www.python.
org/sigs/web-sig
Unsubscribe: http://mail.python.org/mailman/options/web-sig/bo
nd%40yahoo.com
|