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
Built-in compile() and ast module doc issues #48368
Comments
From docs.python.org Both: Refer to the _ast module documentation Both: for information on how to compile into and from AST objects. This sentence should at least have 'and from AST ' deleted. The The ast doc adds nothing. "A modified abstract syntax tree can be The remainder of the sentence could be replaced by the shorter This could be followed by "See ast module documentation for more." ---- That should be ast, not _ast; the existence of the shadow C version is a In the parse() doc lines, 'PyCF_ONLY_AST' should, I think, have the ---- The first, about '\n' versus '\r\n' still applies. The second, at least for 2.5.2 and 3.0c1 (and I presume for 2.6), only See: 'compile' built-in function failures when missing EOL I am not sure what to suggest, but a warning that is nearly always a |
It appears that blanks on the last line also triggers a syntax error. |
General comment: Stylistically, the docs should mostly be stated in a positive manner, |
The 2.6 sentence that got deleted in 3.0: I at least somewhat agree. "When compiling a string with multi-line statements, two caveats apply: could have "two caveats apply" deleted to be more positive. I would "When compiling a string with multi-line statements, terminate all lines This issue came up both in c.l.p discussion and again in invalid bpo-4262 |
Thanks for the suggestions! Changed in r67162. |
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: