Skip to content

bpo-24650: Use full term "generator function" in yield expressions docs - #24663

Merged
iritkatriel merged 2 commits into
python:mainfrom
jacobtylerwalls:patch-1
Jan 7, 2022
Merged

bpo-24650: Use full term "generator function" in yield expressions docs#24663
iritkatriel merged 2 commits into
python:mainfrom
jacobtylerwalls:patch-1

Conversation

@jacobtylerwalls

@jacobtylerwalls jacobtylerwalls commented Feb 27, 2021

Copy link
Copy Markdown
Contributor

https://bugs.python.org/issue24650

Throughout the section "Yield expressions" there is consistent use of "generator function" in all instances except this one, perhaps because the word "function" appears earlier in the sentence.

From glossary:

generator
A function which returns a generator iterator. It looks like a normal function except that it contains yield expressions for producing a series of values usable in a for-loop or that can be retrieved one at a time with the next() function.

Usually refers to a generator function, but may refer to a generator iterator in some contexts. In cases where the intended meaning isn’t clear, using the full terms avoids ambiguity.

I agree with the ticket author that using the full term here would avoid ambiguity. The only other use of the short term "generator" is in this sentence:

When a generator function is called, it returns an iterator known as a generator.

From this usage it would be understandable to draw the incorrect conclusion that generator (short term) == generator iterator.

https://bugs.python.org/issue24650

@the-knights-who-say-ni

Copy link
Copy Markdown

Hello, and thanks for your contribution!

I'm a bot set up to make sure that the project can legally accept this contribution by verifying everyone involved has signed the PSF contributor agreement (CLA).

CLA Missing

Our records indicate the following people have not signed the CLA:

@jacobtylerwalls

For legal reasons we need all the people listed to sign the CLA before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue.

If you have recently signed the CLA, please wait at least one business day
before our records are updated.

You can check yourself to see if the CLA has been received.

Thanks again for the contribution, we look forward to reviewing it!

@willingc

willingc commented Mar 1, 2021

Copy link
Copy Markdown
Contributor

Thanks for the pull request @jacobtylerwalls. Have you submitted a CLA?

@jacobtylerwalls

Copy link
Copy Markdown
Contributor Author

Yep!

@github-actions

github-actions Bot commented Apr 2, 2021

Copy link
Copy Markdown

This PR is stale because it has been open for 30 days with no activity.

@github-actions github-actions Bot added the stale Stale PR or inactive for long period of time. label Apr 2, 2021
@jacobtylerwalls

Copy link
Copy Markdown
Contributor Author

Just need a skip news label, looks like! 🎈

Comment thread Doc/reference/expressions.rst Outdated
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
@iritkatriel
iritkatriel merged commit 273cb8e into python:main Jan 7, 2022
@miss-islington

Copy link
Copy Markdown
Contributor

Thanks @jacobtylerwalls for the PR, and @iritkatriel for merging it 🌮🎉.. I'm working now to backport this PR to: 3.9, 3.10.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

@bedevere-bot

Copy link
Copy Markdown

GH-30461 is a backport of this pull request to the 3.10 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.10 only security fixes label Jan 7, 2022
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jan 7, 2022
…cs (pythonGH-24663)

(cherry picked from commit 273cb8e)

Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jan 7, 2022
…cs (pythonGH-24663)

(cherry picked from commit 273cb8e)

Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
@bedevere-bot

Copy link
Copy Markdown

GH-30462 is a backport of this pull request to the 3.9 branch.

@jacobtylerwalls
jacobtylerwalls deleted the patch-1 branch January 7, 2022 18:57
miss-islington added a commit that referenced this pull request Jan 7, 2022
…cs (GH-24663)

(cherry picked from commit 273cb8e)

Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
miss-islington added a commit that referenced this pull request Jan 7, 2022
…ions docs (GH-24663) (GH-30461)

(cherry picked from commit 273cb8e)


Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>

Automerge-Triggered-By: GH:iritkatriel
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 skip news stale Stale PR or inactive for long period of time.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants