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

[doc] Fix a code example, non declared variable being printed #89661

Closed
AkechiShiro mannequin opened this issue Oct 16, 2021 · 1 comment
Closed

[doc] Fix a code example, non declared variable being printed #89661

AkechiShiro mannequin opened this issue Oct 16, 2021 · 1 comment
Labels
3.7 (EOL) end of life 3.8 only security fixes 3.9 only security fixes 3.10 only security fixes 3.11 only security fixes docs Documentation in the Doc dir type-feature A feature request or enhancement

Comments

@AkechiShiro
Copy link
Mannequin

AkechiShiro mannequin commented Oct 16, 2021

BPO 45498
Nosy @AkechiShiro
PRs
  • bpo-45498: fix csv dictReader code example #28999
  • Files
  • csv-example-fix.patch
  • 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-10-16.21:44:44.191>
    created_at = <Date 2021-10-16.20:59:22.190>
    labels = ['3.7', '3.8', '3.9', '3.10', '3.11', 'type-feature', 'docs']
    title = '[doc] Fix a code example, non declared variable being printed'
    updated_at = <Date 2021-10-16.21:44:44.191>
    user = 'https://github.com/AkechiShiro'

    bugs.python.org fields:

    activity = <Date 2021-10-16.21:44:44.191>
    actor = 'AkechiShiro'
    assignee = 'docs@python'
    closed = True
    closed_date = <Date 2021-10-16.21:44:44.191>
    closer = 'AkechiShiro'
    components = ['Documentation']
    creation = <Date 2021-10-16.20:59:22.190>
    creator = 'AkechiShiro'
    dependencies = []
    files = ['50365']
    hgrepos = []
    issue_num = 45498
    keywords = ['patch']
    message_count = 1.0
    messages = ['404115']
    nosy_count = 2.0
    nosy_names = ['docs@python', 'AkechiShiro']
    pr_nums = ['28999']
    priority = 'normal'
    resolution = None
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue45498'
    versions = ['Python 3.6', 'Python 3.7', 'Python 3.8', 'Python 3.9', 'Python 3.10', 'Python 3.11']

    @AkechiShiro
    Copy link
    Mannequin Author

    AkechiShiro mannequin commented Oct 16, 2021

    I was looking through the documentation at examples for reading CSV files and noticed that an undefined variable was printed in a code example, this affects Python version from 3.6 till 3.110a1 (dev version of the documentation).

    It got me kind of confused, because a for loop does not really declare variables.
    The fix is really simple, just printing the variable that is declared.

    @AkechiShiro AkechiShiro mannequin added 3.7 (EOL) end of life 3.8 only security fixes 3.9 only security fixes 3.10 only security fixes 3.11 only security fixes labels Oct 16, 2021
    @AkechiShiro AkechiShiro mannequin assigned docspython Oct 16, 2021
    @AkechiShiro AkechiShiro mannequin added docs Documentation in the Doc dir type-feature A feature request or enhancement 3.7 (EOL) end of life 3.8 only security fixes 3.9 only security fixes 3.10 only security fixes 3.11 only security fixes labels Oct 16, 2021
    @AkechiShiro AkechiShiro mannequin assigned docspython Oct 16, 2021
    @AkechiShiro AkechiShiro mannequin added docs Documentation in the Doc dir type-feature A feature request or enhancement labels Oct 16, 2021
    @AkechiShiro AkechiShiro mannequin closed this as completed Oct 16, 2021
    @AkechiShiro AkechiShiro mannequin closed this as completed Oct 16, 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
    3.7 (EOL) end of life 3.8 only security fixes 3.9 only security fixes 3.10 only security fixes 3.11 only security fixes docs Documentation in the Doc dir type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    0 participants