-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
docs.python.org | 4.6. match Statements #106780
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
Labels
docs
Documentation in the Doc dir
Comments
That Point definition is in a previous example. The paragraph that follows explains the solution for matching positional parameters. In this case, add |
terryjreedy
added a commit
to terryjreedy/cpython
that referenced
this issue
Jul 15, 2023
Add Point definition with this attribute before example that needs it.
Dear Terry,
Many thanks for your prompt response.
I might be the oldest student -45yrs old - at my university (Uni. of Doha For Science and Tech = UDST), joined when I was 42yrs.
I had an OOP course in Fall22 - Java based - where the instructor informed us, if we don't refer to original documentation, then we are not real programmers and we are not into it.
So, I have decided to even redo my Programming 1 and 2 classes in 2020/21, as I have relied on w3shools as a source also some of the slides provided by instructors at that period.
But, after my Java course, and learning how to read the official documentation of Java, I saw the depth, and now I see the difference between a programmer as a hobby and basic, and someone who is grasping the knowledge academically.
So, I have started reading your wonderful documentation on python.org, and I see how great efforts you and the team have placed to build such a treasure documentation covering all details from what the function, methods do and their impact on the ram, processing times, security, even how to write the code in best efficient ways with best algorithms.
Now, for the 4.6 match issue, and as a beginner, i saw this part in the following "paragraph __match_args__ = ('x', 'y')" also this word "positional parameters" but I kept wondering, were these covered in chapters before 4.6. So I kept going back again to re-read the documentation form the beginning, and spent another like 4 hours, practicing and reading again all chapters before 4.6 but did not find things related to these two. But I found a referenced link to classes, but I thought that would come after I complete chapter 4.6 and moving forward to next topics.
So maybe, it would be nice to consider the contents of the python.org documentation when there is a code that contains logics, methods, etc that will be covered later, to mention that, and to provide a tested workable code to avoid confusion for us as your students🌹
I will be also sharing with you some codes on the documentation also I see them maybe not clear in the aspired outputs, but I will do so in the bug reporting to not disturbing you a lot via emails.
Again, I thank you for the wonderful documentation for python.org, and I will share my wonderful experience with you to our College of Computing and Information Technology at my university, to ensure that we as students, not to learn from 3rd party, but to rely only on your official documentation for python.
Thank you again,
Mohammed AlMawlawi
A proud student at UDST
…________________________________
From: Terry Jan Reedy ***@***.***>
Sent: Saturday, July 15, 2023 10:51 PM
To: python/cpython ***@***.***>
Cc: Al Mawlawi, Mohammad [60071203] ***@***.***>; Author ***@***.***>
Subject: Re: [python/cpython] docs.python.org | 4.6. match Statements (Issue #106780)
That Point definition is in a previous example. The paragraph that follows explains the solution for matching positional parameters. In this case, add __match_args__ = ('x', 'y') to Point and the example works. I will augment the Point list example with a proper Point definition. Working on PR.
—
Reply to this email directly, view it on GitHub<#106780 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/A5E5N5ZI26NIFEXS2EHBQLDXQLYD5ANCNFSM6AAAAAA2LMYMVI>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
terryjreedy
added a commit
that referenced
this issue
Jul 17, 2023
Add Point definition with this attribute before example that needs it.
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
Jul 17, 2023
) Add Point definition with this attribute before example that needs it. (cherry picked from commit 7aa89e5) Co-authored-by: Terry Jan Reedy <[email protected]>
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
Jul 17, 2023
) Add Point definition with this attribute before example that needs it. (cherry picked from commit 7aa89e5) Co-authored-by: Terry Jan Reedy <[email protected]>
terryjreedy
added a commit
that referenced
this issue
Jul 17, 2023
…106820) Add Point definition with this attribute before example that needs it. (cherry picked from commit 7aa89e5) Co-authored-by: Terry Jan Reedy <[email protected]>
terryjreedy
added a commit
that referenced
this issue
Jul 17, 2023
…106819) Add Point definition with this attribute before example that needs it. (cherry picked from commit 7aa89e5) Co-authored-by: Terry Jan Reedy <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Documentation
https://docs.python.org/3/tutorial/controlflow.html
I fixed the code as follows since points is not defined, still it does not work:
error:
Linked PRs
The text was updated successfully, but these errors were encountered: