Open xiaxinmeng opened 1 year ago
I'd say both of these are fixed on gpython master
$ gpython
Python 3.4.0 (none, unknown)
[Gpython dev]
- os/arch: linux/amd64
- go version: go1.19.1
>>> class A: pass
>>>
>>> set(A())
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
FIXME line of source goes here
TypeError: "unsupported operand type(s) for iter: 'A'"
>>>
>>>
>>> x = set('abcde')
>>>
>>>
Transforming invalid types into a set with set() leads to crashing of gpython. For example:
x = set('abcde')
or
Output on go/wasm(https://gpython.org/?wasm):
output with gopherjs(https://gpython.org/):