You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This may be just a documentation bug, but reading
"When the subscriber decorator is used without passing an arguments, the function it decorates is called for every event sent"
made me expect something that did not happen:
from pyramid.events import subscriber, NewRequest
from pyramid.config import Configurator
@subscriber()
def mysubscriber(event):
print event
@subscriber(NewRequest)
def s(event):
print event
if __name__ == "__main__":
from waitress import serve
config = Configurator()
config.scan(__name__)
serve(config.make_wsgi_app())
upon requesting http://localhost:8080 subscriber s will get notified, but mysubscriber won't.
The text was updated successfully, but these errors were encountered:
This may be just a documentation bug, but reading
"When the
subscriber
decorator is used without passing an arguments, the function it decorates is called for every event sent"made me expect something that did not happen:
upon requesting http://localhost:8080 subscriber s will get notified, but mysubscriber won't.
The text was updated successfully, but these errors were encountered: