Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-107017: Change Chapter Strings to Texts in the Introduction chapter.#107104

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

TommyUnreal
Copy link
Contributor

@TommyUnrealTommyUnreal commentedJul 23, 2023
edited by github-actionsbot
Loading

While the term "string" is well-known in computer science, it might not resonate with beginners or non-technical individuals. Term Texts emphasize practical application in a similar way to Numbers and Lists chapters. This can make the introduction part less intimidating and more beginner-oriented. On the other hand, people coming from other technologies will not be surprised that text is represented with strings.


📚 Documentation preview 📚:https://cpython-previews--107104.org.readthedocs.build/

While term "string" is well known in computer science, it might not resonate with beginners or non-technical individuals. Term Texts emphasize practical application in similar way to Numbers and Lists chapters. This can make the introduction part less intimidating and more beginner-oriented. On the other hand people comming from other technologies will not be surprised that text is represented with strings.
@@ -138,13 +138,14 @@ and uses the ``j`` or ``J`` suffix to indicate the imaginary part

.. _tut-strings:

Strings
Texts
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd actually keep the headingStrings, because that's the correct name.

in several ways. They can be enclosed in single quotes (``'...'``) or
double quotes (``"..."``) with the same result [#]_. ``\`` can be used
to escape quotes::
Different kinds of text have the type :class:`str`. This includes
Copy link
Contributor

Choose a reason for hiding this comment

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

I would suggest:

Python can manipulate text ("strings") as well as numbers. This can include [your list of examples].

Strings are enclosed [...].

characters "``!``", words "``rabbit``", names "``Paris``", sentences
"``Got your back.``", etc. "``Yay! :)``". They can be enclosed in single
quotes (``'...'``) or double quotes (``"..."``) with the same result [#]_.
``\`` can be used to escape quotes::
Copy link
Contributor

Choose a reason for hiding this comment

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

I think the concept of escaping (and the word) is not familiar to many beginners, so I'd suggest something like:

To quote a quote, we need to "escape" it, by preceding it with\::

to escape quotes::
Different kinds of text have the type :class:`str`. This includes
characters "``!``", words "``rabbit``", names "``Paris``", sentences
"``Got your back.``", etc. "``Yay! :)``". They can be enclosed in single
Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps add:

Even "123" is a string (and not a number - because it's enclosed in quotes.

Changed the description, removed duplicate explanations and reworkedexamples so they are more consice with its paragraph.
strings are equivalent. The string is enclosed in double quotes if
the string contains a single quote and no double quotes, otherwise it is
enclosed in single quotes. The :func:`print` function produces a more
In the interactive interpreter, the string definition and output string
Copy link
Contributor

Choose a reason for hiding this comment

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

"In the Python shell..."

TommyUnreal reacted with thumbs up emoji
Copy link
Member

@hugovkhugovk left a comment

Choose a reason for hiding this comment

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

Some minor suggestions, thanks for the PR!

TommyUnreal reacted with thumbs up emoji
@bedevere-bot
Copy link

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phraseI have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

@hugovkhugovk added needs backport to 3.11only security fixes needs backport to 3.12only security fixes labelsJul 23, 2023
TommyUnrealand others added3 commitsJuly 23, 2023 22:10
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
@TommyUnreal
Copy link
ContributorAuthor

Some minor suggestions, thanks for the PR!

Thank you for the feedback!

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Copy link
Member

@hugovkhugovk left a comment

Choose a reason for hiding this comment

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

Thank you!

@hugovkhugovk merged commit2cf9902 intopython:mainJul 24, 2023
@miss-islington
Copy link
Contributor

Thanks@TommyUnreal for the PR, and@hugovk for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12.
🐍🍒⛏🤖

@bedevere-bot
Copy link

GH-107167 is a backport of this pull request to the3.12 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull requestJul 24, 2023
…chapter. (pythonGH-107104)(cherry picked from commit2cf9902)Co-authored-by: TommyUnreal <45427816+TommyUnreal@users.noreply.github.com>Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
@bedevere-botbedevere-bot removed the needs backport to 3.12only security fixes labelJul 24, 2023
@bedevere-bot
Copy link

GH-107168 is a backport of this pull request to the3.11 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull requestJul 24, 2023
…chapter. (pythonGH-107104)(cherry picked from commit2cf9902)Co-authored-by: TommyUnreal <45427816+TommyUnreal@users.noreply.github.com>Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
@bedevere-botbedevere-bot removed the needs backport to 3.11only security fixes labelJul 24, 2023
hugovk added a commit that referenced this pull requestJul 24, 2023
… chapter. (GH-107104) (#107167)Co-authored-by: TommyUnreal <45427816+TommyUnreal@users.noreply.github.com>Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
hugovk added a commit that referenced this pull requestJul 24, 2023
… chapter. (GH-107104) (#107168)Co-authored-by: TommyUnreal <45427816+TommyUnreal@users.noreply.github.com>Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
carljm added a commit to carljm/cpython that referenced this pull requestJul 24, 2023
* main: (73 commits)  Thoroughly refactor the cases generator (python#107151)  Docs: Add missing markup to Argument Clinic docs (python#106876)pythongh-107162: Document errcode.h usage in its comment (python#107177)pythongh-106320: Remove private _PyDict C API (python#107145)  Fix PyVectorcall_Function doc versionadded (python#107140)  Docs: Remove duplicate word in Argument Clinic howto heading (python#107169)pythongh-107017: Change Chapter Strings to Texts in the Introduction chapter. (python#107104)pythongh-106320: Remove private _PyObject C API (python#107159)  Docs: fix typo in os.pwrite docstring (python#107087)pythongh-105291: Add link to migration guide for distutils (python#107130)pythongh-106948: Docs: Disable links for C standard library functions, OS utility functions and system calls (python#107062)pythongh-106320: Remove _PyBytes_Join() C API (python#107144)pythongh-106320: Remove private _PyObject C API (python#107147)pythongh-106320: Remove _PyTuple_MaybeUntrack() C API (python#107143)pythongh-106320: Remove _PyIsSelectable_fd() C API (python#107142)  Remove superflous whitespaces in `layout.html`. (pythonGH-107067)pythongh-107122: Update what's news for dbm.*dbm.clear() method (pythongh-107135)pythongh-107122: Add clear method to dbm.ndbm module (pythongh-107126)pythongh-62519: Make pgettext search plurals when translation is not found (python#107118)pythongh-107122: Add clear method to dbm.gdbm.module (pythongh-107127)  ...
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@evildmpevildmpevildmp approved these changes

@hugovkhugovkhugovk approved these changes

Assignees
No one assigned
Labels
docsDocumentation in the Doc dirskip news
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

5 participants
@TommyUnreal@bedevere-bot@miss-islington@evildmp@hugovk

[8]ページ先頭

©2009-2025 Movatter.jp