-
-
Notifications
You must be signed in to change notification settings - Fork 30k
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
enhanced dir? #91410
Comments
current dir gives output like this,
but wouldn't it be better if the output was like this,
??? |
This would be nice, but backward compatibility alone means we can't change dir() to return a dictionary. What you propose would make more sense as a new function, perhaps in a package like pydoc or a third-party tool like IPython. |
would adding an argument to dir be a possible solution,
|
plus I would want it to have some more methods,
using enhanced dir should give,
obtained from, (here only printing, made a dictionary in the implementation in the PR)
this check fails for,
I would also want these,
which were obtained from,
and it fails for,
|
I would like this enhanced dir to have one more feature, that is the type of these functions, so, our enhanced dir would work something like this,
which gives,
|
i think so one more thing could be added to it, could name the keyword as
this would run a few checks on our argument, such as, whether it,
so, for
|
This is the kind of thing that people implement as a utility and publish on pypl. After a few years, if it's stable and has many users, it becomes possible to discuss adding it to the stdlib (which requires a PEP). You don't start by adding it to the stdlib. |
sorry, i am new to this, and dont know much about pypl (or is it pypi?), i created a pull request for this also, and added it to could you inform me where would be the suitable place for the function i created. is this the pypl url? |
The cpython bug tracker and review system are not the places for learner questions. They are the places where we actually work in cpython. Try python-list for general python questions and core-mentorship for questions about contributing to python. |
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: