From 02160a7dc2675bf35597b5416aae3c6042698e83 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Wed, 8 Sep 2010 20:46:04 +0000 Subject: [PATCH] - Document deferred. --- docs/api.rst | 2 ++ docs/binding.rst | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/docs/api.rst b/docs/api.rst index 22e4cf2..7d1673f 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -118,6 +118,8 @@ Schema-Related .. autoclass:: SequenceSchema + .. autoclass:: deferred + .. attribute:: null Represents a null value in colander-related operations. diff --git a/docs/binding.rst b/docs/binding.rst index 4243f45..8a9fb17 100644 --- a/docs/binding.rst +++ b/docs/binding.rst @@ -154,6 +154,12 @@ Let's take a look at an example: default_date = datetime.date.today(), categories = [('one', 'One'), ('two', 'Two')] ) + +We use ``colander.deferred`` in its preferred manner here: as a +decorator to a function that takes two arguments. For a schema node +value to be considered deferred, it must be an instance of +``colander.deferred`` and using that class as a decorator is the +easiest way to ensure that this happens. To perform binding, the ``bind`` method of a schema node must be called. ``bind`` returns a *clone* of the schema node (and its