lvgl / lv_binding_micropython

LVGL binding for MicroPython
MIT License
237 stars 157 forks source link

Avoid struct members named 'del' #99

Closed amirgon closed 3 years ago

amirgon commented 3 years ago

del is reserved in Python.
Rename to delete.

See also https://forum.lvgl.io/t/updating-from-lvgl-v6-to-v7/3541

embeddedt commented 3 years ago

This seems like an oversight on MicroPython's end as well... shouldn't they prevent reserved names from being registered to begin with?

amirgon commented 3 years ago

shouldn't they prevent reserved names from being registered to begin with?

It's a bit hard to prevent this, since native Micropython modules are registered on compile time by defining static C structs. I don't think Micropython allows you to declare something like this on runtime.