i have read pythonic documentation and i have some questions
https://wiki.octave.org/Pythonic
from Ideas section :
1-
"This works only when all the keys for the dict are strings."
x = pyeval ("{1:'one',2:'two'}");
but the key here is not string and it is working
note : x.("1") ... this syntax generates the following error for me :
error: AttributeError: 'dict' object has no attribute '1'
error: called from
subsref at line 42 column 9
but this syntax worked : x{1} , ans = one
2-
Element indexing on a list or other sequence object with a range or set of indices doesn't return the right number of output arguments.
code :
x = py.list ({1, 2, 3, 4, 5, 6});
x{1:3}
y = {x{1:3}}; |
current output :
y =
{
[1,1] =
{
[1,1] = 1
[1,2] = 2
[1,3] = 3
}
}
Is this the correct wanted output : y = [1.0 , 2.0 , 3.0] ?