Skip to content

Glossary: "method" - improve formatting#144714

Open
wjandrea wants to merge 4 commits intopython:mainfrom
wjandrea:patch-3
Open

Glossary: "method" - improve formatting#144714
wjandrea wants to merge 4 commits intopython:mainfrom
wjandrea:patch-3

Conversation

@wjandrea
Copy link
Contributor

@wjandrea wjandrea commented Feb 11, 2026

  • Move up "function" link
  • Add links to "class" and "attribute"
  • Use consistent "See also"

From:

method

A function which is defined inside a class body. If called as an attribute of an instance of that class, the method will get the instance object as its first argument (which is usually called self). See function and nested scope.

To:

method

A function which is defined inside a class body. If called as an attribute of an instance of that class, the method will get the instance object as its first argument (which is usually called self).

See also nested scope.


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

@bedevere-app bedevere-app bot added docs Documentation in the Doc dir skip news labels Feb 11, 2026
@github-project-automation github-project-automation bot moved this to Todo in Docs PRs Feb 11, 2026
@wjandrea wjandrea marked this pull request as ready for review February 11, 2026 16:50
Copy link
Member

@picnixz picnixz left a comment

Choose a reason for hiding this comment

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

I don't think it's necessary to add a reference to class actually. We don't link it for metaclass for instance, which would make more sense IMO and it doesn't strike as being necessary in this case. But I'm ok with removing the "See function" and only keep the "nested scope".

will get the instance object as its first :term:`argument` (which is
usually called ``self``).

See also :term:`nested scope`.
Copy link
Member

Choose a reason for hiding this comment

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

Most entries have their "See also" either in a separate paragraph or at the end of the sentence (e.g., "mutable" has lots of small terms at the end) so I think you can also keep the "nested scope" in the same paragraph (the "function" entry also inlines its "see also" sentence).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

3 participants