Colin Macdonald I have update the PR. our comments have disappeared.
I was asking if we want length=1 for any object (like sys)? I guess we need length=1 only for scalars (octave 1x1 matrices which are now converted to python scalars). So, if users will never receive such a value wrapped in a pyobject then we probably don't even need the error test!?
Now that pycall converts arguments of type pyobject, shouldn't using pycall here instead of pyeval and sprintf be more efficient? I would like to see more uses of pybojects as "first-class" objects that can be called and passed into functions, rather than using the obj.id back-door method everywhere.