diff options
-rw-r--r-- | doc/src/advanced.rst | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/doc/src/advanced.rst b/doc/src/advanced.rst index dafb1f5..eecbcfd 100644 --- a/doc/src/advanced.rst +++ b/doc/src/advanced.rst @@ -145,7 +145,9 @@ geometric type: ... self.y = y >>> def adapt_point(point): - ... return AsIs("'(%s, %s)'" % (adapt(point.x), adapt(point.y))) + ... x = adapt(point.x).getquoted() + ... y = adapt(point.y).getquoted() + ... return AsIs("'(%s, %s)'" % (x, y)) >>> register_adapter(Point, adapt_point) |