Skip to content
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 Improve wording on classmethod/staticmethod #78266

Closed
andresdelfino opened this issue Jul 10, 2018 · 5 comments
Closed

doc Improve wording on classmethod/staticmethod #78266

andresdelfino opened this issue Jul 10, 2018 · 5 comments
Labels
3.7 (EOL) end of life 3.8 only security fixes docs Documentation in the Doc dir type-feature A feature request or enhancement

Comments

@andresdelfino
Copy link
Contributor

BPO 34085
Nosy @csabella, @andresdelfino, @miss-islington
PRs
  • bpo-34085: Improve wording on classmethod/staticmethod #8228
  • [3.7] bpo-34085: Improve wording on classmethod/staticmethod (GH-8228) #12544
  • [2.7] bpo-34085: Improve wording on classmethod/staticmethod (GH-8228) #12545
  • 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:

    assignee = None
    closed_at = <Date 2019-03-25.23:23:35.900>
    created_at = <Date 2018-07-10.16:33:43.301>
    labels = ['3.8', 'type-feature', '3.7', 'docs']
    title = 'doc Improve wording on classmethod/staticmethod'
    updated_at = <Date 2019-03-25.23:23:44.571>
    user = 'https://github.com/andresdelfino'

    bugs.python.org fields:

    activity = <Date 2019-03-25.23:23:44.571>
    actor = 'cheryl.sabella'
    assignee = 'docs@python'
    closed = True
    closed_date = <Date 2019-03-25.23:23:35.900>
    closer = 'cheryl.sabella'
    components = ['Documentation']
    creation = <Date 2018-07-10.16:33:43.301>
    creator = 'adelfino'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 34085
    keywords = ['patch']
    message_count = 5.0
    messages = ['321390', '338834', '338835', '338836', '338838']
    nosy_count = 4.0
    nosy_names = ['docs@python', 'cheryl.sabella', 'adelfino', 'miss-islington']
    pr_nums = ['8228', '12544', '12545']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue34085'
    versions = ['Python 2.7', 'Python 3.7', 'Python 3.8']

    @andresdelfino
    Copy link
    Contributor Author

    1. The classmethod definition reads:

    """
    The @classmethod form is a function decorator – see the description of function definitions in Function definitions for details.

    It can be called either on the class (such as C.f()) or on an instance (such as C().f())
    """

    The second paragraph seems like talking about the classmethod function instead of a class method. The same goes for staticmethod.

    1. The staticmethod definition reads:

    """
    It can be called either on the class (such as C.f()) or on an instance (such as C().f()). The instance is ignored except for its class.
    """

    "The instance is ignored except for its class." seems to have been copied from classmethod definition.

    1. There is redundant text:

    "see the description of function definitions in Function definitions"

    "consult the documentation on the standard type hierarchy in The standard type hierarchy"

    PR fixes this.

    @andresdelfino andresdelfino added 3.8 only security fixes 3.7 (EOL) end of life labels Jul 10, 2018
    @andresdelfino andresdelfino added docs Documentation in the Doc dir type-feature A feature request or enhancement labels Jul 10, 2018
    @csabella
    Copy link
    Contributor

    New changeset 548cb60 by Cheryl Sabella (Andre Delfino) in branch 'master':
    bpo-34085: Improve wording on classmethod/staticmethod (bpo-8228)
    548cb60

    @miss-islington
    Copy link
    Contributor

    New changeset bd96393 by Miss Islington (bot) in branch '2.7':
    bpo-34085: Improve wording on classmethod/staticmethod (GH-8228)
    bd96393

    @miss-islington
    Copy link
    Contributor

    New changeset b23b086 by Miss Islington (bot) in branch '3.7':
    bpo-34085: Improve wording on classmethod/staticmethod (GH-8228)
    b23b086

    @csabella
    Copy link
    Contributor

    Thanks for the report and the PR, Andrés!

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.7 (EOL) end of life 3.8 only security fixes docs Documentation in the Doc dir type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    3 participants