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
Implement subprocess.Popen.__repr__ #82905
Comments
I was working with a Popen object recently in the shell and it was annoying to see the |
I agree that this could be nice. A PR (with tests!) would be welcome! |
I think this sounds great and I'll take a crack at it over the next few days. If anybody wants to jump ahead of me I don't mind. |
+1 for a more informative repr (like we did with regex match objects). There are a lot of parameters to subprocess.Popen(). RR is on the right track suggesting that only a small, useful subset of those be included: args and the return code. We could add the *pid* argument as well, but may be no more useful or attractive than the current repr's object id. The repr should be enclosed in angle brackets because it can't recreate the object. |
Hi @Jason.Killen. I am new to cpython and would like to try this one out. Thank you. |
I agree with Raymond, the repr should include the args and return code. IMO it should *not* include the pid, for two reasons:
|
Thanks for the suggestion Ram, and thanks for PR Andrey! |
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: