How to create a list of PVectors?

I’m trying to convert some Processing java code into processing.py however the original java code used

PVector[] directions;

However when I try to do:

self.directions = PVector[]

In python the code returns an error, it also returns an error elswhere in the code when I remove the square brackets.
is there a way to create a series of PVectors?

1 Like

Py.Processing.org/reference/indexbrackets.html

DIRECTIONS = 10
directions = DIRECTIONS * [ None ]
3 Likes