Mercurial > pytave
diff @pyobject/dummy.m @ 282:4c4747646e12
Make pyobject callable by users (to convert input)
This makes "pyobject(...)" behave more a cast or typical constructor
call. This should supercede the "fromPythonVarName" hack in some cases.
* @pyobject/dummy.m: Use new pyobject call.
* @pyobject/pyobject.m (@pyobject/pyobject): Redo ctor.
* python_to_octave.cc: Use new pyobject ctor.
author | Colin Macdonald <cbm@m.fsf.org> |
---|---|
date | Thu, 28 Jul 2016 10:55:44 -0700 |
parents | a3660e7f8dc9 |
children | 72ecb31b163a |
line wrap: on
line diff
--- a/@pyobject/dummy.m Fri Jul 29 20:15:39 2016 -0700 +++ b/@pyobject/dummy.m Thu Jul 28 10:55:44 2016 -0700 @@ -25,8 +25,10 @@ ## Simple example: ## @example ## @group -## pyexec ("g = 6") -## g = pyobject.fromPythonVarName ("g"); +## g = pyobject (int32 (6)) +## @result{} g = [pyobject ...] +## +## 6 ## ## sort (methods (g)) ## @result{} ans =