I have been puzzled with the way GH Python component work.
Basically I was trying to recreate the grasshopper’s “Circle” component - I wanted to have a couple of points as an input (that is more than one point) and then create a circle from those points, with defined radius.
I tried this code:
import rhinoscriptsyntax as rs a =  for pt in x: circ = rs.AddCircle(pt,y) a.append(circ)
And it worked. A list of points is plugged into the “x” GH Python input plug, and a slider float value into the “y” plug. I had to set the “x” input plug to “List Access” instead of “Item Access”, which is I guess obvious because “x” is a list of points.
But on the other side, this code seems to work too:
import rhinoscriptsyntax as rs a = rs.AddCircle(x,y)
And that is my reason for posting this topic - why does this second code work? There is no “for loop” in it, and we are dealing with a list of points here, not with a single list. I though grasshopper components work on a principle of a iteration, like presented in the first code?
I attached the .gh file with both components.