vectorgraphics / asymptote

2D & 3D TeX-Aware Vector Graphics Language
https://asymptote.sourceforge.io/
GNU General Public License v3.0
542 stars 90 forks source link

Unpacking iterable #350

Closed avidseeker closed 1 year ago

avidseeker commented 1 year ago

I usually need to unpack a list of points of arrays of points. Like this:

pair A,B,C;
A = tABC[0]; B = tABC[1]; C = tABC[2];

In python, one can have

A,B,C = triangle_arr

to unpack values of the list to A,B,C. Would be great to have a feature similar to this.

johncbowman commented 1 year ago

Being a C-like language, Asymptote doesn't support unpacking list elements to named variables.