Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Why does the coords method sometimes return a list of points and sometimes a list of coordinates?

0
10 Posted

Why does the coords method sometimes return a list of points and sometimes a list of coordinates?

0
10

The rational is ease of use. When the return value of coords is a number of (1 or 2) points, well-known in advance, the returned value is a flat list of 2 or 4 coordinates. A flat list is easier to use by the developper. In all other cases, the returned value is a list of points, i.e. a list of lists of coordinates.

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123