You can't override members of a built-in module. The definition of these modules is in ROM.
Code: Select all
>>> sys.path=['/', '/lib', '']
But as you've discovered, the member itself is a list, and therefore supports the insert method.
This is just the definition of the QSTR values that are stored in this list. It allows code elsewhere to write `mp_obj_list_append(mp_sys_path, MP_OBJ_NEW_QSTR(MP_QSTR__slash_lib));` which is what actually defines the default value of sys.path.