Python points list format

Hi,

I noticed that when there’s a list of points inside GHPython it prints out as a list of <Rhino.Geometry…> elements. However, if you print one element the format changes to coordinates only.

Why is it like so?

image

Hello,

When you print a Python list it shows you the result of calling repr() on each of its contents, whereas if you print an object you get the str() representation.

The former is intended to be unambiguous, and read by developers. The latter to be readable by humans :wink:

Try print repr(pts[0]) to get the former

1 Like