Message133372
A first patch, misses any documentation changes. While working on it, I realised that modules technically shadow the __dict__ attribute (because modules use tp_dictoffset, hence module have a __dict__ member that points to the instance dict). I updated `_shadowed_dict()` so that it now disregards member descriptors as shadowing (as they will never trigger any code execution), but theoretically, the members can be any object (not just dicts), so I have to think a bit more about that case (as a custom object still can trigger code execution).
Also, `dir_static()` behaves slightly different from `dir()` (e.g. `dir()` raises a `TypeError` if the module's "__dict__" attribute isn't a dictionary, which is kind of impossible for `dir_static` as it doesn't even try to acccess `__dict__` if it is shadowed), but IMHO such edge-cases are expected to behave differently for a static version and hence we don't care at all about that. |
|
Date |
User |
Action |
Args |
2011-04-09 02:01:31 | Trundle | set | recipients:
+ Trundle, eric.araujo, michael.foord, daniel.urban |
2011-04-09 02:01:30 | Trundle | set | messageid: <1302314490.94.0.782015619517.issue11770@psf.upfronthosting.co.za> |
2011-04-09 02:01:30 | Trundle | link | issue11770 messages |
2011-04-09 02:01:30 | Trundle | create | |
|