Mercurial > pytave
changeset 316:a140160b2319
doc: clean up pyeval and pyexec doc strings
* pyeval.cc: Fix Texinfo syntax and optional argument description. Fix dict
example to reflect recent changes.
* pyexec.cc: Fix Texinfo syntax and optional argument description.
author | Mike Miller <mtmiller@octave.org> |
---|---|
date | Tue, 09 Aug 2016 21:51:28 -0700 |
parents | 5b9c008c1d05 |
children | 461f333daf67 |
files | pyeval.cc pyexec.cc |
diffstat | 2 files changed, 15 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/pyeval.cc Tue Aug 09 15:24:34 2016 -0700 +++ b/pyeval.cc Tue Aug 09 21:51:28 2016 -0700 @@ -42,11 +42,13 @@ DEFUN_DLD (pyeval, args, nargout, "-*- texinfo -*-\n\ @deftypefn {} {} pyeval (@var{expr})\n\ -@deftypefnx {} {@var{x} =} pyeval (@var{expr})\n\ -@deftypefn {} {} pyeval (@var{expr}, @var{localNS})\n\ -@deftypefnx {} {@var{x} =} pyeval (@var{expr}, @var{localNS})\n\ +@deftypefnx {} {} pyeval (@var{expr}, @var{localns})\n\ +@deftypefnx {} {@var{x} =} pyeval (@dots{})\n\ Evaluate a Python expression and return the result.\n\ -You can supply a 'localNS' to enforce all changes in that namespace.\n\ +\n\ +When called with an optional second argument, @var{localns} is a\n\ +@code{py.dict} that acts as the namespace for any assignments or other\n\ +side effects of the expression.\n\ \n\ Examples:\n\ @example\n\ @@ -54,10 +56,9 @@ pyexec (\"import sys\")\n\ pyeval (\"sys.version\")\n\ @result{} ...\n\ -pyeval (\"dict(one=1, two=2)\")\n\ - @result{} scalar structure containing the fields:\n\ - two = 2\n\ - one = 1\n\ +pyeval (\"dict(two=2)\")\n\ + @result{} [pyobject ...]\n\ + @{'two': 2@}\n\ @end group\n\ @end example\n\ @seealso{pycall, pyexec}\n\
--- a/pyexec.cc Tue Aug 09 15:24:34 2016 -0700 +++ b/pyexec.cc Tue Aug 09 21:51:28 2016 -0700 @@ -40,10 +40,13 @@ DEFUN_DLD (pyexec, args, nargout, "-*- texinfo -*-\n\ -@deftypefn {} {} pyexec (@var{expr})\n\ -@deftypefn {} {} pyexec (@var{expr}, @var{localNS})\n\ +@deftypefn {} {} pyexec (@var{expr})\n\ +@deftypefnx {} {} pyexec (@var{expr}, @var{localns})\n\ Execute a Python expression or block of code.\n\ -You can supply a 'localNS' to enforce all changes in that namespace.\n\ +\n\ +When called with an optional second argument, @var{localns} is a\n\ +@code{py.dict} that acts as the namespace for any assignments or other\n\ +side effects of the expression.\n\ \n\ Examples:\n\ @example\n\