diff @pyobject/dummy.m @ 327:15c20ab4b80a

Do not automatically convert Python integer types to Octave (see issue #56) * python_to_octave.cc (pytave::pyobj_to_octvalue): Drop automatic conversion of Python int and long types to Octave. * @pyobject/pyobject.m (pyobject.length, pyobject.size): Cast values to double. Adapt %!tests to changes. * @pyobject/cell.m, @pyobject/dummy.m, @pyobject/subsasgn.m, @pyobject/subsref.m, pycall.cc, pyeval.cc: Adapt usage examples and %!tests to changes.
author Mike Miller <mtmiller@octave.org>
date Sat, 13 Aug 2016 21:24:29 -0700
parents 01ff03fef237
children 087e7bc3697f
line wrap: on
line diff
--- a/@pyobject/dummy.m	Sat Aug 13 19:57:49 2016 -0700
+++ b/@pyobject/dummy.m	Sat Aug 13 21:24:29 2016 -0700
@@ -25,7 +25,7 @@
 ## Some simple Python objects are converted to equivalent Octave values:
 ## @example
 ## @group
-## pyeval ("6")
+## pyeval ("6.0")
 ##   @result{} ans = 6
 ## @end group
 ## @end example
@@ -54,9 +54,9 @@
 ##       [4,1] = real
 ##     @}
 ##
-## g.numerator
+## double (g.numerator)
 ##   @result{} ans =  6
-## g.denominator
+## double (g.denominator)
 ##   @result{} ans =  1
 ## @end group
 ## @end example
@@ -83,7 +83,7 @@
 ## We can accesss ``callables'' (methods) of objects:
 ## @example
 ## @group
-## x.pop ("two")
+## double (x.pop ("two"))
 ##   @result{} ans =  2
 ## @end group
 ## @end example
@@ -120,9 +120,9 @@
 ## A Python list is returned as a @@pyobject:
 ## @example
 ## @group
-## L = pyeval ("[42, 'hello', sys]")
+## L = pyeval ("[42.0, 'hello', sys]")
 ##   @result{} L = [pyobject ...]
-##       [42, 'hello', <module 'sys' (built-in)>]
+##       [42.0, 'hello', <module 'sys' (built-in)>]
 ## @end group
 ## @end example
 ##