Skip to content
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

Syntax error in Python3 documentation #88237

Closed
evolvah mannequin opened this issue May 7, 2021 · 3 comments
Closed

Syntax error in Python3 documentation #88237

evolvah mannequin opened this issue May 7, 2021 · 3 comments
Labels
docs Documentation in the Doc dir

Comments

@evolvah
Copy link
Mannequin

evolvah mannequin commented May 7, 2021

BPO 44071
Nosy @sweeneyde

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:

assignee = None
closed_at = <Date 2021-05-07.20:57:28.539>
created_at = <Date 2021-05-07.20:44:44.168>
labels = ['invalid', 'docs']
title = 'Syntax error in Python3 documentation'
updated_at = <Date 2021-05-07.20:57:28.538>
user = 'https://bugs.python.org/evolvah'

bugs.python.org fields:

activity = <Date 2021-05-07.20:57:28.538>
actor = 'evolvah'
assignee = 'docs@python'
closed = True
closed_date = <Date 2021-05-07.20:57:28.539>
closer = 'evolvah'
components = ['Documentation']
creation = <Date 2021-05-07.20:44:44.168>
creator = 'evolvah'
dependencies = []
files = []
hgrepos = []
issue_num = 44071
keywords = []
message_count = 3.0
messages = ['393222', '393223', '393224']
nosy_count = 3.0
nosy_names = ['docs@python', 'Dennis Sweeney', 'evolvah']
pr_nums = []
priority = 'normal'
resolution = 'not a bug'
stage = 'resolved'
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue44071'
versions = ['Python 3.6']

@evolvah
Copy link
Mannequin Author

evolvah mannequin commented May 7, 2021

https://docs.python.org/3/library/subprocess.html#subprocess.check_output

The code sample seems to have a misplaced closing round bracket. It should go after "stdout"

run(..., check=True, stdout=PIPE).stdout

@evolvah evolvah mannequin assigned docspython May 7, 2021
@evolvah evolvah mannequin added the docs Documentation in the Doc dir label May 7, 2021
@evolvah evolvah mannequin assigned docspython May 7, 2021
@evolvah evolvah mannequin added the docs Documentation in the Doc dir label May 7, 2021
@sweeneyde
Copy link
Member

I think the docs are correct. For example:

>>> import subprocess
>>> subprocess.run("ls", check=True, stdout=subprocess.PIPE).stdout
<my files here>
>>> subprocess.check_output("ls")
<my files here>

@evolvah
Copy link
Mannequin Author

evolvah mannequin commented May 7, 2021

Thank you, Dennis! I was wrong. Closing the ticket.

@evolvah evolvah mannequin closed this as completed May 7, 2021
@evolvah evolvah mannequin added the invalid label May 7, 2021
@evolvah evolvah mannequin closed this as completed May 7, 2021
@evolvah evolvah mannequin added the invalid label May 7, 2021
@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir
Projects
None yet
Development

No branches or pull requests

1 participant