From b8bc3a7abccdc44d86719ee153cb179fe8b666b8 Mon Sep 17 00:00:00 2001 From: David Glick Date: Wed, 10 Jul 2013 15:58:48 -0700 Subject: [PATCH] More fixes to example code --- docs/extending.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/extending.rst b/docs/extending.rst index 46572fa..be9b4a9 100644 --- a/docs/extending.rst +++ b/docs/extending.rst @@ -41,7 +41,7 @@ serializes a boolean to the string ``true`` or ``false`` or the special if appstruct is null: return null if not isinstance(appstruct, bool): - raise Invalid(node, '%r is not a boolean') + raise Invalid(node, '%r is not a boolean' % appstruct) return appstruct and 'true' or 'false' def deserialize(self, node, cstruct): @@ -54,7 +54,7 @@ serializes a boolean to the string ``true`` or ``false`` or the special return True return False - def cstruct_children(self): + def cstruct_children(self, node, cstruct): return [] Here's how you would use the resulting class as part of a schema: