changeset 241:73c0b59a0ee9

Add documentation for pycall returning None * pycall.cc: Add docs.
author Colin Macdonald <cbm@m.fsf.org>
date Sun, 24 Jul 2016 23:36:12 -0700
parents 708715efa18e
children f37d7854135c
files pycall.cc
diffstat 1 files changed, 17 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/pycall.cc	Mon Jul 25 13:27:17 2016 -0700
+++ b/pycall.cc	Sun Jul 24 23:36:12 2016 -0700
@@ -56,6 +56,23 @@
   @result{} 1.4142\n\
 @end group\n\
 @end example\n\
+\n\
+If the callable has no return, and an lvalue is specified, it will be set\n\
+to @code{None}.  However, if no lvalue was specified, @code{ans} will not\n\
+be set.  For example:\n\
+@example\n\
+@group\n\
+s = pyeval (\"set([1, 2])\")\n\
+pycall (s.add, 3)\n\
+\n
+r = pycall (s.add, 4)\n\
+  @result{} v = [pyobject ...]\n\
+\n\
+      None\n\
+\n\
+@end group\n\
+@end example\n\
+\n\
 @seealso{pyeval, pyexec}\n\
 @end deftypefn")
 {