-
-
Notifications
You must be signed in to change notification settings - Fork 31.7k
inspect.dir_static #55979
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
A version of dir that returns all the members that can be seen by getattr_static. |
Would it respect __dir__? |
No. It would return all members accessible to getattr_static (which is completely unrelated to what __dir__ may or may not return). Also calling __dir__ would mean code execution, and the point of these functions is to avoid this where possible. |
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 Also, |
Thanks for the patch Andreas. On a quick read through it looks good. I'll do a proper review shortly. |
See issue bpo-11813 for the module problem. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: