-
-
Notifications
You must be signed in to change notification settings - Fork 30k
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
doc Add "magic method" entry to Glossary #78013
Comments
PR adds "magic method" to the glossary, and adds a mention in Data Model 3.3. Special method names. |
It is unclear what problem this issue is meant to serve. If the reference manual uses 'magic method', I think it should be changed. Special method names are obvious by their form and need not and should not be labelled. I think doc policy issues should be discussed on pydev or python-ideas lists. |
The original intention of the PR, as shown in this issue, was to add "magic method" in the Glossary as a synonym for "special method", and add "magic method" in Data model (so that people reading Data Model would understand what a "magic method" is). Then I was requested some changes, and stated I wasn't sure about them. I don't believe special methods should be explicitly declared in each mention. The "problem" this PR intended to "solve" was to let people know what a "magic method" is, because as I see it, it has become pretty standard to use "special method" with no indication that it is a synonym of "magic method". |
I'll update the PR so that it shows what the original intention was. |
Just for clarification. My question in the PR was:
This is because I was not sure if the intention of the PR was changing these everywhere or not. Sorry |
A quick grep on the 3.7 branch indicates that the standard documentation includes each of the terms "magic method" and "special method" about the same number of times. (I didn't check for instances that wrapped lines.) Perhaps we should decide on just one of these terms and fix references that use the other. I agree this can be a source of confusion, but having two terms for the same concept is a bug. I don't think we need to change references to "the __something__ method", because those are specific. We only need to decide on and consistently use the categorical term for these methods when referring to the entire category. |
Terry: Pablo: Fred: |
For context, I opened this issue after Raymond's reasoning in bpo-33825 (which I agreed with). |
Sorry, for some reason the PR doesn't show the intended changes. I'm working on fixing it. |
Fred, did you intend to delete people from nosy? |
Indeed, I did not. Fixed now. I hope. |
Thanks for the patch! |
Several hours ago, I read the unittest.mock doc, which uses 'magic methods' to explain MagicMock. So I decided an entry really was needed. Andrés, thanks for sticking with this, |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: