Thanks to visit codestin.com
Credit goes to github.com

Skip to content

gh-116563: Update tutorial error example #116569

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

Merged
merged 1 commit into from
Mar 11, 2024
Merged

Conversation

terryjreedy
Copy link
Member

@terryjreedy terryjreedy commented Mar 10, 2024

There now may be multiple carets pointing at a token rather than just a character. Fix a sentence about possible causes.


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

There now may be multiple carets pointing at a token
rather than just a character.  Fix a sentence about
possible causes.
@terryjreedy terryjreedy added docs Documentation in the Doc dir needs backport to 3.11 only security fixes needs backport to 3.12 only security fixes labels Mar 10, 2024
@terryjreedy terryjreedy requested a review from pablogsal March 10, 2024 17:56
@terryjreedy terryjreedy self-assigned this Mar 10, 2024
@Privat33r-dev
Copy link
Contributor

Privat33r-dev commented Mar 10, 2024

Thanks for the PR. The 'token' term is not being explained (even by means of reference) or even mentioned earlier in the tutorial, maybe it can be a good point to add a reference as well?
search result for the 'token' in the tutorial

@terryjreedy
Copy link
Member Author

(interactive.rst is chapter 14; this is chapter 8 and hence earlier.) This paragraph already used "token"; I used it a second time. There is no entry in the glossary; I guess beginning programmers are expected to understand 'token' as in 'tokenizer', but I can see that might be too much. Do you think '(code unit)' would help?

@Privat33r-dev
Copy link
Contributor

(interactive.rst is chapter 14; this is chapter 8 and hence earlier.) This paragraph already used "token"; I used it a second time. There is no entry in the glossary; I guess beginning programmers are expected to understand 'token' as in 'tokenizer', but I can see that might be too much. Do you think '(code unit)' would help?

I am not sure, maybe we even need to separate this issue.

As a potential solution, we can add another entry in the glossary to shortly provide a basic intuition for a token/code unit. In general, introduction of the term might be of use to explain some concepts, such as error highlighting/handling, syntax. Maybe it would even make sense to introduce it right in this chapter along with error handling.

But all that is just my opinion and I would like to see other perspectives on this question.

@terryjreedy terryjreedy merged commit 3e45030 into python:main Mar 11, 2024
@miss-islington-app
Copy link

Thanks @terryjreedy for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

@terryjreedy
Copy link
Member Author

I am merging as is to fix the issue. Defining the already used word, 'token', if really needed, is a different issue.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Mar 11, 2024
There now may be multiple carets pointing at a token
rather than just a character.  Fix the sentence about
possible causes.
(cherry picked from commit 3e45030)

Co-authored-by: Terry Jan Reedy <[email protected]>
@bedevere-app
Copy link

bedevere-app bot commented Mar 11, 2024

GH-116624 is a backport of this pull request to the 3.12 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.12 only security fixes label Mar 11, 2024
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Mar 11, 2024
There now may be multiple carets pointing at a token
rather than just a character.  Fix the sentence about
possible causes.
(cherry picked from commit 3e45030)

Co-authored-by: Terry Jan Reedy <[email protected]>
@bedevere-app
Copy link

bedevere-app bot commented Mar 11, 2024

GH-116625 is a backport of this pull request to the 3.11 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.11 only security fixes label Mar 11, 2024
@terryjreedy terryjreedy added needs backport to 3.11 only security fixes needs backport to 3.12 only security fixes labels Mar 11, 2024
@miss-islington-app
Copy link

Thanks @terryjreedy for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11.
🐍🍒⛏🤖

@miss-islington-app
Copy link

Thanks @terryjreedy for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Mar 11, 2024
There now may be multiple carets pointing at a token
rather than just a character.  Fix the sentence about
possible causes.
(cherry picked from commit 3e45030)

Co-authored-by: Terry Jan Reedy <[email protected]>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Mar 11, 2024
There now may be multiple carets pointing at a token
rather than just a character.  Fix the sentence about
possible causes.
(cherry picked from commit 3e45030)

Co-authored-by: Terry Jan Reedy <[email protected]>
@terryjreedy terryjreedy removed the needs backport to 3.11 only security fixes label Mar 11, 2024
@terryjreedy terryjreedy removed the needs backport to 3.12 only security fixes label Mar 11, 2024
@terryjreedy terryjreedy deleted the err branch March 11, 2024 22:05
terryjreedy added a commit that referenced this pull request Mar 11, 2024
There now may be multiple carets pointing at a token
rather than just a character.  Fix the sentence about
possible causes.
(cherry picked from commit 3e45030)

Co-authored-by: Terry Jan Reedy <[email protected]>
terryjreedy added a commit that referenced this pull request Mar 11, 2024
There now may be multiple carets pointing at a token
rather than just a character.  Fix the sentence about
possible causes.
(cherry picked from commit 3e45030)

Co-authored-by: Terry Jan Reedy <[email protected]>
adorilson pushed a commit to adorilson/cpython that referenced this pull request Mar 25, 2024
There now may be multiple carets pointing at a token
rather than just a character.  Fix the sentence about
possible causes.
diegorusso pushed a commit to diegorusso/cpython that referenced this pull request Apr 17, 2024
There now may be multiple carets pointing at a token
rather than just a character.  Fix the sentence about
possible causes.
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants