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

print documentation: flush is also a keyword argument #73977

Closed
Lucioric2000 mannequin opened this issue Mar 10, 2017 · 5 comments
Closed

print documentation: flush is also a keyword argument #73977

Lucioric2000 mannequin opened this issue Mar 10, 2017 · 5 comments
Labels
3.7 (EOL) end of life docs Documentation in the Doc dir type-bug An unexpected behavior, bug, or error

Comments

@Lucioric2000
Copy link
Mannequin

Lucioric2000 mannequin commented Mar 10, 2017

BPO 29791
Nosy @berkerpeksag, @Lucioric2000
PRs
  • bpo-29791: Clarify that flush is keyword-only argument #1093
  • [3.6] bpo-29791: Clarify that flush is keyword-only argument (GH-1093) #1111
  • [3.5] bpo-29791: Clarify that flush is keyword-only argument (GH-1093) #1112
  • 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 2017-04-13.13:17:49.281>
    created_at = <Date 2017-03-10.21:06:33.249>
    labels = ['type-bug', '3.7', 'docs']
    title = 'print documentation: flush is also a keyword argument'
    updated_at = <Date 2017-04-13.13:17:49.280>
    user = 'https://github.com/Lucioric2000'

    bugs.python.org fields:

    activity = <Date 2017-04-13.13:17:49.280>
    actor = 'berker.peksag'
    assignee = 'docs@python'
    closed = True
    closed_date = <Date 2017-04-13.13:17:49.281>
    closer = 'berker.peksag'
    components = ['Documentation']
    creation = <Date 2017-03-10.21:06:33.249>
    creator = 'Lucio Ricardo Montero Valenzuela'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 29791
    keywords = []
    message_count = 5.0
    messages = ['289411', '291608', '291612', '291613', '291614']
    nosy_count = 3.0
    nosy_names = ['docs@python', 'berker.peksag', 'Lucio Ricardo Montero Valenzuela']
    pr_nums = ['1093', '1111', '1112']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue29791'
    versions = ['Python 3.5', 'Python 3.6', 'Python 3.7']

    @Lucioric2000
    Copy link
    Mannequin Author

    Lucioric2000 mannequin commented Mar 10, 2017

    In the print() function documentation (https://docs.python.org/3/library/functions.html#print), the first line says "Print objects to the text stream file, separated by sep and followed by end. sep, end and file, if present, must be given as keyword arguments.", but the function definition is said to be "print(*objects, sep=' ', end='\n', file=sys.stdout, flush=False)". Based on the Python user function definition grammar, the only way of passing an value to a non-star parameters that appear after a star-parameter is with the keyword (so the interpreter knows not to push the value into the star-parameter list/mapping). So the flush parameter can be set only naming explicitly the keyword 'flush' ¿Isn't it?. So the first line of the print() function documentation should say "Print objects to the text stream file, separated by sep and followed by end. sep, end, file and flush, if present, must be given as keyword arguments.". Flush is a new parameter, so maybe you forgot to update this line of the documentation to include it.
    Best regards.

    @Lucioric2000 Lucioric2000 mannequin added the type-feature A feature request or enhancement label Mar 10, 2017
    @Lucioric2000 Lucioric2000 mannequin assigned docspython Mar 10, 2017
    @Lucioric2000 Lucioric2000 mannequin added the docs Documentation in the Doc dir label Mar 10, 2017
    @berkerpeksag berkerpeksag added 3.7 (EOL) end of life type-bug An unexpected behavior, bug, or error and removed type-feature A feature request or enhancement labels Apr 12, 2017
    @berkerpeksag
    Copy link
    Member

    New changeset 61b9ac9 by Berker Peksag in branch 'master':
    bpo-29791: Clarify that flush is keyword-only argument (bpo-1093)
    61b9ac9

    @berkerpeksag
    Copy link
    Member

    New changeset df97837 by Berker Peksag in branch '3.5':
    bpo-29791: Clarify that flush is keyword-only argument (GH-1093)
    df97837

    @berkerpeksag
    Copy link
    Member

    New changeset 119d94a by Berker Peksag in branch '3.6':
    bpo-29791: Clarify that flush is keyword-only argument (GH-1093)
    119d94a

    @berkerpeksag
    Copy link
    Member

    Thanks for the report!

    @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
    3.7 (EOL) end of life docs Documentation in the Doc dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant