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

Docstrings in itertools recipes should have triple-quotes #86616

Closed
peternorvig2 mannequin opened this issue Nov 24, 2020 · 7 comments
Closed

Docstrings in itertools recipes should have triple-quotes #86616

peternorvig2 mannequin opened this issue Nov 24, 2020 · 7 comments
Labels
3.7 (EOL) end of life 3.8 only security fixes 3.9 only security fixes 3.10 only security fixes

Comments

@peternorvig2
Copy link
Mannequin

peternorvig2 mannequin commented Nov 24, 2020

BPO 42450
Nosy @rhettinger, @ericvsmith, @miss-islington
PRs
  • bpo-42450 Minor updates to the itertools recipes #23555
  • [3.9] bpo-42450: Minor updates to the itertools recipes (GH-23555) #23562
  • 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 2020-11-24.04:20:17.079>
    created_at = <Date 2020-11-24.01:54:26.170>
    labels = ['invalid', '3.7', '3.8', '3.9', '3.10']
    title = 'Docstrings in itertools recipes should have triple-quotes'
    updated_at = <Date 2020-11-29.19:14:13.442>
    user = 'https://bugs.python.org/peternorvig2'

    bugs.python.org fields:

    activity = <Date 2020-11-29.19:14:13.442>
    actor = 'rhettinger'
    assignee = 'none'
    closed = True
    closed_date = <Date 2020-11-24.04:20:17.079>
    closer = 'rhettinger'
    components = []
    creation = <Date 2020-11-24.01:54:26.170>
    creator = 'peter.norvig2'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 42450
    keywords = []
    message_count = 7.0
    messages = ['381704', '381705', '381706', '381831', '381875', '382087', '382090']
    nosy_count = 4.0
    nosy_names = ['rhettinger', 'eric.smith', 'miss-islington', 'peter.norvig2']
    pr_nums = ['23555', '23562']
    priority = 'normal'
    resolution = 'not a bug'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue42450'
    versions = ['Python 3.6', 'Python 3.7', 'Python 3.8', 'Python 3.9', 'Python 3.10']

    @peternorvig2
    Copy link
    Mannequin Author

    peternorvig2 mannequin commented Nov 24, 2020

    In the itertools recipes ( https://docs.python.org/3/library/itertools.html#itertools-recipes ) there are 21 functions that have single-quote docstrings. These should be changed to triple-quotes, as mandated in PEP-257.

    @peternorvig2 peternorvig2 mannequin added 3.7 (EOL) end of life 3.8 only security fixes 3.9 only security fixes 3.10 only security fixes labels Nov 24, 2020
    @ericvsmith
    Copy link
    Member

    I don't think the readability of the examples would be improved by triple quotes. In fact, I think it would be reduced.

    @rhettinger
    Copy link
    Contributor

    I concur with Eric.

    @ericvsmith
    Copy link
    Member

    Although I do have to say it wouldn't offend me if the partition and nth_combination examples were changed to double quotes to be consistent! But it's not important.

    @rhettinger
    Copy link
    Contributor

    Thanks Eric, I will update those quotation marks in the next edit to the recipes.

    Peter, sorry I closed this so abruptly. All suggestions are welcome. In this case, readability trumps other rules. Also, PEP-257 wasn't intended to be strict. Lots of code in the standard library follows local conventions which vary module to module.

    @rhettinger
    Copy link
    Contributor

    New changeset fc40b30 by Raymond Hettinger in branch 'master':
    bpo-42450: Minor updates to the itertools recipes (GH-23555)
    fc40b30

    @rhettinger
    Copy link
    Contributor

    New changeset a83119d by Miss Islington (bot) in branch '3.9':
    bpo-42450: Minor updates to the itertools recipes (GH-23555) (GH-23562)
    a83119d

    @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
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants