Eryk Sun <eryk...@gmail.com> added the comment:

> I've got in mind a PyListObject subclass with calls to PyOS_FSPath 
> before insert, append, extend and __getitem__.

The sys module doesn't prevent rebinding sys.path. Most code I think is careful 
to update sys.path. But surely some code replaces it with a new list instead of 
updating via insert(), append(), extend(), or updating a slice such as 
`sys.path[:] = new_path`. For example, ModifiedInterpreter.transfer_path() in 
Lib/idlelib/pyshell.py rebinds sys.path. It doesn't have to, but it does.

----------
nosy: +eryksun

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue32642>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to