Dyalog / pynapl

Dyalog APL ←→ Python interface
MIT License
74 stars 10 forks source link

vectors of mixed type #24

Open justin2004 opened 1 year ago

justin2004 commented 1 year ago

this order works as expected

>>> apl.eval("3,'a'")
[3, 'a']

but this does not

>>> apl.eval("'a',3")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/root/pynapl/pynapl/APLPyConnect.py", line 410, in eval
    return answer.to_python(self)
  File "/root/pynapl/pynapl/Array.py", line 210, in to_python
    return ''.join(self.data)
TypeError: sequence item 1: expected str instance, int found

although that list that would be produced is valid python:

>>> ['a',3]
['a', 3]