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

Documentation of property.{getter,setter,deleter} fails to mention that a *new* property is returned #87887

Closed
anntzer mannequin opened this issue Apr 3, 2021 · 4 comments
Labels
3.9 only security fixes 3.10 only security fixes 3.11 only security fixes docs Documentation in the Doc dir type-bug An unexpected behavior, bug, or error

Comments

@anntzer
Copy link
Mannequin

anntzer mannequin commented Apr 3, 2021

BPO 43721
Nosy @rhettinger, @hugovk, @miss-islington, @iritkatriel
PRs
  • bpo-43721: Fix docstrings for property.getter/setter/deleter #31046
  • [3.9] bpo-43721: Fix docstrings for property.getter/setter/deleter (GH-31046) #31886
  • [3.10] bpo-43721: Fix docstrings for property.getter/setter/deleter (GH-31046) #31887
  • Add missing newline to NEWS entry #31893
  • 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 2022-03-15.00:12:50.969>
    created_at = <Date 2021-04-03.23:10:19.625>
    labels = ['3.11', 'type-bug', '3.9', '3.10', 'docs']
    title = 'Documentation of property.{getter,setter,deleter} fails to mention that a *new* property is returned'
    updated_at = <Date 2022-03-15.07:54:28.664>
    user = 'https://github.com/anntzer'

    bugs.python.org fields:

    activity = <Date 2022-03-15.07:54:28.664>
    actor = 'hugovk'
    assignee = 'none'
    closed = True
    closed_date = <Date 2022-03-15.00:12:50.969>
    closer = 'AlexWaygood'
    components = ['Documentation']
    creation = <Date 2021-04-03.23:10:19.625>
    creator = 'Antony.Lee'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 43721
    keywords = ['patch']
    message_count = 4.0
    messages = ['390149', '415208', '415209', '415210']
    nosy_count = 5.0
    nosy_names = ['rhettinger', 'docs@python', 'hugovk', 'miss-islington', 'iritkatriel']
    pr_nums = ['31046', '31886', '31887', '31893']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue43721'
    versions = ['Python 3.9', 'Python 3.10', 'Python 3.11']

    @anntzer
    Copy link
    Mannequin Author

    anntzer mannequin commented Apr 3, 2021

    property.{getter,setter,deleter} returns a new property with a new {fget,fset,fdel}. This is documented at https://docs.python.org/3/library/functions.html#property, and intended behavior (see e.g. https://bugs.python.org/issue1620).

    However the corresponding docstrings, e.g. pydoc property.getter, are "Descriptor to change the getter (setter, deleter) on a property." This wording suggests that no copy is being made and that the property is mutated in-place.

    @anntzer anntzer mannequin assigned docspython Apr 3, 2021
    @anntzer anntzer mannequin added the docs Documentation in the Doc dir label Apr 3, 2021
    @rhettinger rhettinger assigned rhettinger and unassigned docspython and rhettinger Apr 4, 2021
    @iritkatriel iritkatriel added 3.9 only security fixes 3.10 only security fixes 3.11 only security fixes type-bug An unexpected behavior, bug, or error labels Feb 1, 2022
    @iritkatriel
    Copy link
    Member

    New changeset e3d348a by Irit Katriel in branch 'main':
    bpo-43721: Fix docstrings for property.getter/setter/deleter (GH-31046)
    e3d348a

    @miss-islington
    Copy link
    Contributor

    New changeset cebdc32 by Miss Islington (bot) in branch '3.10':
    bpo-43721: Fix docstrings for property.getter/setter/deleter (GH-31046)
    cebdc32

    @miss-islington
    Copy link
    Contributor

    New changeset f1a5e1b by Miss Islington (bot) in branch '3.9':
    bpo-43721: Fix docstrings for property.getter/setter/deleter (GH-31046)
    f1a5e1b

    @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.9 only security fixes 3.10 only security fixes 3.11 only security fixes docs Documentation in the Doc dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    4 participants