Tested in Rhino 8.6 on Windows 11. I couldn’t log into the jetbrains youtrack page to make a bug report there.
From a Python3 component in SDK mode, the code:
#! python3
import System
import Rhino
import Grasshopper
import rhinoscriptsyntax as rs
class MyComponent(Grasshopper.Kernel.GH_ScriptInstance):
def RunScript(self, x, y):
a = list(range(3))
return a
produces a PyObject:
The same component in script mode (as when placed) containing:
#! python3
a = list(range(3))
(and Iron Python 2 components in either mode) produces what I would expect:
compare_lists_Rhino_8.gh (24.2 KB)