comparison @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
comparison
equal deleted inserted replaced
280:3bf799e80ca5 282:4c4747646e12
23 ## 23 ##
24 ## 24 ##
25 ## Simple example: 25 ## Simple example:
26 ## @example 26 ## @example
27 ## @group 27 ## @group
28 ## pyexec ("g = 6") 28 ## g = pyobject (int32 (6))
29 ## g = pyobject.fromPythonVarName ("g"); 29 ## @result{} g = [pyobject ...]
30 ##
31 ## 6
30 ## 32 ##
31 ## sort (methods (g)) 33 ## sort (methods (g))
32 ## @result{} ans = 34 ## @result{} ans =
33 ## @{ 35 ## @{
34 ## [1,1] = bit_length 36 ## [1,1] = bit_length