-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
27bd6d5
3edff8b
de2e3c5
0306f45
7bd1f2a
bd02929
ef4f321
b737cac
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -138,13 +138,14 @@ and uses the ``j`` or ``J`` suffix to indicate the imaginary part | |
|
||
.. _tut-strings: | ||
|
||
Strings | ||
Texts | ||
------- | ||
TommyUnreal marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
Besides numbers, Python can also manipulate strings, which can be expressed | ||
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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would suggest:
|
||
characters "``!``", words "``rabbit``", names "``Paris``", sentences | ||
"``Got your back.``", etc. "``Yay! :)``". They can be enclosed in single | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Perhaps add:
|
||
quotes (``'...'``) or double quotes (``"..."``) with the same result [#]_. | ||
``\`` can be used to escape quotes:: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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:
|
||
|
||
>>> 'spam eggs' # single quotes | ||
'spam eggs' | ||
|
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.
I'd actually keep the heading Strings, because that's the correct name.