INADA Naoki <songofaca...@gmail.com> added the comment:

https://github.com/python/cpython/blob/f822549653d8d09bffff5b7dcddfdf12679a787c/Python/pythonrun.c#L391-L399

__file__ and __cached__ are added here.  And,

https://github.com/python/cpython/blob/f822549653d8d09bffff5b7dcddfdf12679a787c/Python/pythonrun.c#L441-L442

Only __file__ is removed here.  I feel __cached__ should be removed too.


On the other hand, if None is valid value for __cached__, site.abs_paths() 
should ignore it.

https://www.python.org/dev/peps/pep-3147/#file

> It is recommended that when nothing sensible can be calculated, 
> implementations should set the __cached__ attribute to None.

It seems it's valid, and recommended for some cases.  So PR-6731 looks OK.

----------
nosy: +inada.naoki

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

Reply via email to