GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Clean up comma usage in Doc/library/functions.rst by Adminixtrator · Pull Request #27083 · python/cpython

Conversation

@Adminixtrator

@Adminixtrator Adminixtrator commented Jul 10, 2021 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

"Readability counts."

Excerpt from The Zen of Python by Tim Peters

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@Adminixtrator
Update functions.rst
a1eb540
@the-knights-who-say-ni

the-knights-who-say-ni commented Jul 10, 2021

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).

Recognized GitHub username

We couldn't find a bugs.python.org (b.p.o) account corresponding to the following GitHub usernames:

@Adminixtrator

This might be simply due to a missing "GitHub Name" entry in one's b.p.o account settings. This is necessary for legal reasons before we can look at this contribution. Please follow the steps outlined in the CPython devguide to rectify this issue.

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

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@the-knights-who-say-ni the-knights-who-say-ni added the CLA not signed label Jul 10, 2021
@bedevere-bot bedevere-bot added awaiting review docs Documentation in the Doc dir labels Jul 10, 2021
@Adminixtrator
Merge branch 'python:main' into main
faff1df
ambv
ambv reviewed Jul 13, 2021
View reviewed changes
Comment thread Doc/library/functions.rst Outdated

The Python interpreter has a number of functions and types built into it that
are always available. They are listed here in alphabetical order.
The Python interpreter has several functions and types built into it that

@ambv ambv Jul 13, 2021

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How is "several" more readable than "a number of"?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@ambv ambv Jul 13, 2021

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(also note trailing space)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Adminixtrator reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
Comment thread Doc/library/functions.rst
==================

The Python interpreter has a number of functions and types built into it that
are always available. They are listed here in alphabetical order.

@ambv ambv Jul 13, 2021

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We generally use double spaces after periods between sentences.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@Adminixtrator Adminixtrator Jul 16, 2021

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's from formatting, didn't notice.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread Doc/library/functions.rst Outdated
returning an :term:`awaitable`. Awaiting this returns the next value of the
iterator. If *default* is given, it is returned if the iterator is exhausted,
otherwise :exc:`StopAsyncIteration` is raised.
otherwise, :exc:`StopAsyncIteration` is raised.

@ambv ambv Jul 13, 2021

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The usage before was correct. If you insist on using the comma when "otherwise" begins a sentence fragment, you need to change the preceding comma into a semicolon to emphasize the composition of the sentence (it looks too similar to enumeration otherwise). I would just leave those cases alone.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Adminixtrator reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
Comment thread Doc/library/functions.rst Outdated
Return :const:`True` if the *object* argument appears callable,
:const:`False` if not. If this returns ``True``, it is still possible that a
call fails, but if it is ``False``, calling *object* will never succeed.
call fails, but if it is ``False``, the calling *object* will never succeed.

@ambv ambv Jul 13, 2021

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"calling" is a verb here, this is invalid.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Adminixtrator reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
Comment thread Doc/library/functions.rst Outdated

Return an enumerate object. *iterable* must be a sequence, an
:term:`iterator`, or some other object which supports iteration.
:term:`iterator`, or some other object that supports iteration.

@ambv ambv Jul 13, 2021

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How is "that" better than "which"?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@Adminixtrator Adminixtrator Jul 16, 2021

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's referring to a defining clause

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@ambv ambv Jul 16, 2021

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"which" can also refer to defining clauses, see: https://dictionary.cambridge.org/grammar/british-grammar/relative-clauses-defining-and-non-defining

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread Doc/library/functions.rst Outdated
will call *object* with no arguments for each call to its
:meth:`~iterator.__next__` method; if the value returned is equal to
*sentinel*, :exc:`StopIteration` will be raised, otherwise the value will
*sentinel*, :exc:`StopIteration` will be raised, otherwise, the value will

@ambv ambv Jul 13, 2021

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread Doc/library/functions.rst Outdated
Return an :term:`iterator` object. The first argument is interpreted very
differently depending on the presence of the second argument. Without a
second argument, *object* must be a collection object which supports the
second argument, *object* must be a collection object that supports the

@ambv ambv Jul 13, 2021

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread Doc/library/functions.rst Outdated
One useful application of the second form of :func:`iter` is to build a
block-reader. For example, reading fixed-width blocks from a binary
database file until the end of file is reached::
database file until the end of the file is reached::

@ambv ambv Jul 13, 2021

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes it arguably less readable, "end of file" is an IT idiom.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Adminixtrator reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
Comment thread Doc/library/functions.rst Outdated
Retrieve the next item from the *iterator* by calling its
:meth:`~iterator.__next__` method. If *default* is given, it is returned
if the iterator is exhausted, otherwise :exc:`StopIteration` is raised.
if the iterator is exhausted, otherwise, :exc:`StopIteration` is raised.

@ambv ambv Jul 13, 2021

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread Doc/library/functions.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Adminixtrator
Adminixtrator commented Jul 16, 2021
View reviewed changes

@Adminixtrator Adminixtrator left a comment

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @ambv
Once resolved, should I fix these and create a new PR or that will be done from your end?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@ambv

ambv commented Jul 16, 2021

Copy link
Copy Markdown
Contributor

Once resolved, should I fix these and create a new PR or that will be done from your end?

I'm not sure what you mean. You resolve issues by updating your PR. I'll merge it once it's in an acceptable state.

Adminixtrator reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Adminixtrator added 8 commits July 18, 2021 00:54
@Adminixtrator
Update functions.rst
8d4dd94
@Adminixtrator
Update functions.rst
98c4ce0
@Adminixtrator
Update functions.rst
361fdae
@Adminixtrator
Update functions.rst
8fd9f04
@Adminixtrator
Update functions.rst
9cc2cd6
@Adminixtrator
Update functions.rst
9cc0f43
@Adminixtrator
Update functions.rst
3aa17f2
@Adminixtrator
Update functions.rst
f98497c
Adminixtrator
Adminixtrator commented Jul 18, 2021
View reviewed changes

@Adminixtrator Adminixtrator left a comment

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All done @ambv

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
ambv
ambv reviewed Jul 19, 2021
View reviewed changes
Comment thread Doc/library/functions.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Doc/library/functions.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Doc/library/functions.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Doc/library/functions.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Doc/library/functions.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

ambv added 5 commits July 19, 2021 17:10
@ambv
revert comma move
19d062a
@ambv
s/,/;/
0441c2a
@ambv
s/,/;/
e20614d
@ambv
revert that/which change
f2b54db
@ambv
revert that/which change
0c2f755
@ambv ambv added skip issue skip news labels Jul 19, 2021
@ambv ambv changed the title --improved readability Clean up comma usage Jul 19, 2021
@ambv ambv changed the title Clean up comma usage Clean up comma usage in Doc/library/functions.rst Jul 19, 2021
@ambv
ambv merged commit 1e651c6 into python:main Jul 19, 2021
@bedevere-bot

bedevere-bot commented Jul 19, 2021

Copy link
Copy Markdown

@ambv: Please replace # with GH- in the commit message next time. Thanks!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot bedevere-bot removed the awaiting review label Jul 19, 2021
@ambv

ambv commented Jul 19, 2021

Copy link
Copy Markdown
Contributor

Thanks! ✨ 🍰 ✨

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

sthagen added a commit to sthagen/python-cpython that referenced this pull request Jul 19, 2021
@sthagen
Merge pull request #541 from python/main
f209a64
Clean up comma usage in Doc/library/functions.rst (python#27083)
@ambv ambv added the needs backport to 3.10 label Jul 19, 2021
@miss-islington

miss-islington commented Jul 19, 2021

Copy link
Copy Markdown
Contributor

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

Adminixtrator reacted with laugh emoji Adminixtrator reacted with rocket emoji
All reactions
  • 😄 1 reaction
  • 🚀 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jul 19, 2021
@Adminixtrator @miss-islington
Clean up comma usage in Doc/library/functions.rst (pythonGH-27083)
68dec1c
(cherry picked from commit 1e651c6)

Co-authored-by: α∂мιηιχтяαтσя <[email protected]>
@bedevere-bot

bedevere-bot commented Jul 19, 2021

Copy link
Copy Markdown

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot bedevere-bot removed the needs backport to 3.10 label Jul 19, 2021
ambv pushed a commit that referenced this pull request Jul 19, 2021
@miss-islington @Adminixtrator
Clean up comma usage in Doc/library/functions.rst (GH-27083) (#27243)
2d04920
(cherry picked from commit 1e651c6)

Co-authored-by: α∂мιηιχтяαтσя <[email protected]>
shihai1991 added a commit to shihai1991/cpython that referenced this pull request Jul 20, 2021
@shihai1991
Merge remote-tracking branch 'origin/main' into bpo_42035
56e8889
* origin/main: (1146 commits)
  bpo-42064: Finalise establishing sqlite3 global state (pythonGH-27155)
  bpo-44678: Separate error message for discontinuous padding in binascii.a2b_base64 strict mode (pythonGH-27249)
  correct spelling (pythonGH-27076)
  bpo-44524: Add missed __name__ and __qualname__ to typing module objects (python#27237)
  bpo-27513: email.utils.getaddresses() now handles Header objects (python#13797)
  Clean up comma usage in Doc/library/functions.rst (python#27083)
  bpo-42238: Fix small rst issue in NEWS.d/. (python#27238)
  bpo-41972: Tweak fastsearch.h string search algorithms (pythonGH-27091)
  bpo-44340: Add support for building with clang full/thin lto (pythonGH-27231)
  bpo-44661: Update property_descr_set to use vectorcall if possible. (pythonGH-27206)
  bpo-44645: Check for interrupts on any potentially backwards edge (pythonGH-27216)
  bpo-41546: make pprint (like print) not write to stdout when it is None (pythonGH-26810)
  bpo-44554: refactor pdb targets (and internal tweaks) (pythonGH-26992)
  bpo-43086: Add handling for out-of-spec data in a2b_base64 (pythonGH-24402)
  bpo-44561: Update hyperlinks in Doc/distributing/index.rst (python#27032)
  bpo-42355: symtable.get_namespace() now checks whether there are multiple or any namespaces found (pythonGH-23278)
  bpo-44654: Do not export the union type related symbols (pythonGH-27223)
  bpo-44633: Fix parameter substitution of the union type with wrong types. (pythonGH-27218)
  bpo-44654: Refactor and clean up the union type implementation (pythonGH-27196)
  bpo-20291: Fix MSVC warnings in getargs.c (pythonGH-27211)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@ambv ambv ambv left review comments

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

docs Documentation in the Doc dir skip issue skip news

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@Adminixtrator @the-knights-who-say-ni @ambv @bedevere-bot @miss-islington
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.