Mercurial > pytave
changeset 206:dfaf3abfbb8f
doc fix
* @pyobj/pyobj: remove broken doctest, which doesn't run anyway
* @pyobj/dummy: add here, and fix
author | Colin Macdonald <cbm@m.fsf.org> |
---|---|
date | Fri, 20 May 2016 23:10:02 -0700 |
parents | 98cde0dcf09f |
children | 4a369c94cab8 |
files | @pyobj/dummy.m @pyobj/pyobj.m |
diffstat | 2 files changed, 25 insertions(+), 23 deletions(-) [+] |
line wrap: on
line diff
--- a/@pyobj/dummy.m Fri May 20 23:04:31 2016 -0700 +++ b/@pyobj/dummy.m Fri May 20 23:10:02 2016 -0700 @@ -22,6 +22,31 @@ %% Does nothing, stores doctests for now. %% %% +%% Simple example: +%% @example +%% @group +%% pyexec('g = 6') +%% g = pyobj.fromPythonVarName('g'); +%% +%% sort(whatmethods(g)) +%% @result{} ans = +%% @{ +%% [1,1] = bit_length +%% [1,2] = conjugate +%% [1,1] = denominator +%% [1,2] = imag +%% [1,3] = numerator +%% [1,4] = real +%% @} +%% +%% g.numerator +%% @result{} ans = 6 +%% g.denominator +%% @result{} ans = 1 +%% @end group +%% @end example +%% +%% %% You can delete an object in Python and it will persist: %% @example %% @group
--- a/@pyobj/pyobj.m Fri May 20 23:04:31 2016 -0700 +++ b/@pyobj/pyobj.m Fri May 20 23:10:02 2016 -0700 @@ -23,29 +23,6 @@ %% %% TODO: where/how to document classdef classes? %% -%% Example: -%% @example -%% @group -%% pyexec('g = 6') -%% g = pyobj('g'); -%% -%% sort(whatmethods(g)) -%% @result{} ans = -%% @{ -%% [1,1] = denominator -%% [1,2] = imag -%% [1,3] = numerator -%% [1,4] = real -%% @} -%% -%% g.numerator -%% @result{} ans = 6 -%% g.denominator -%% @result{} ans = 1 -%% @end group -%% @end example -%% -%% %% @seealso{pyexec, pyeval} %% @end defun