jdf / Processing.py-Bugs

A home for all bugs and feature requests about Python Mode for the Processing Development Environment.
41 stars 8 forks source link

Doesn't recognize copy() function in Lists #333

Open Rohan-Agrawal029 opened 2 years ago

Rohan-Agrawal029 commented 2 years ago

When using the copy function of lists in python, it gives the error AttributeError: 'list' object has no attribute 'copy'

In the below preview, 'Brain' is a class which has a list attribute names 'instructions'

image

villares commented 2 years ago

Hi, @Rohan-Agrawal029 ! I believe it might be due to Processing Python mode being based on Jython (Python 2.7) . You could use:

list_copy = my_list[:] 

Cheers!