From 5c52daef7004a1e43a7c2fc25613e3d92c4b6b8e Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 14 Aug 2011 00:53:53 -0400 Subject: - Added the ``pyramid.interfaces.IDict`` interface representing the methods of a dictionary, for documentation purposes only (IMultiDict and IBeforeRender inherit from it). - Previously the ``pyramid.events.BeforeRender`` event *wrapped* a dictionary (it addressed it as its ``_system`` attribute). Now it *is* a dictionary (it inherits from ``dict``), and it's the value that is passed to templates as a top-level dictionary. --- docs/api/events.rst | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'docs/api/events.rst') diff --git a/docs/api/events.rst b/docs/api/events.rst index 59657a820..31a0e22c1 100644 --- a/docs/api/events.rst +++ b/docs/api/events.rst @@ -25,6 +25,15 @@ Event Types .. autoclass:: BeforeRender :members: + :inherited-members: + :exclude-members: update + + .. method:: update(E, **F) + + Update D from dict/iterable E and F. If E has a .keys() method, does: + for k in E: D[k] = E[k] If E lacks .keys() method, does: for (k, v) in + E: D[k] = v. In either case, this is followed by: for k in F: D[k] = + F[k]. See :ref:`events_chapter` for more information about how to register code which subscribes to these events. -- cgit v1.2.3