Skip to content

super cannot invoke descriptors #60567

Closed
Closed

Description

@RonnyPfannschmidt
BPO 16363
Nosy @bitdancer, @RonnyPfannschmidt
Superseder
  • bpo-14965: super() and property inheritance behavior
  • Files
  • test_super.py
  • 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 2012-10-30.13:42:37.585>
    created_at = <Date 2012-10-30.08:07:59.028>
    labels = ['interpreter-core', 'type-feature']
    title = 'super cannot invoke descriptors'
    updated_at = <Date 2012-10-30.13:42:37.583>
    user = 'https://github.com/RonnyPfannschmidt'

    bugs.python.org fields:

    activity = <Date 2012-10-30.13:42:37.583>
    actor = 'r.david.murray'
    assignee = 'none'
    closed = True
    closed_date = <Date 2012-10-30.13:42:37.585>
    closer = 'r.david.murray'
    components = ['Interpreter Core']
    creation = <Date 2012-10-30.08:07:59.028>
    creator = 'Ronny.Pfannschmidt'
    dependencies = []
    files = ['27792']
    hgrepos = []
    issue_num = 16363
    keywords = []
    message_count = 2.0
    messages = ['174184', '174211']
    nosy_count = 2.0
    nosy_names = ['r.david.murray', 'Ronny.Pfannschmidt']
    pr_nums = []
    priority = 'normal'
    resolution = 'duplicate'
    stage = 'resolved'
    status = 'closed'
    superseder = '14965'
    type = 'enhancement'
    url = 'https://bugs.python.org/issue16363'
    versions = ['Python 2.7', 'Python 3.2', 'Python 3.3', 'Python 3.4']

    Activity

    1. RonnyPfannschmidt commented on Oct 30, 2012

      RonnyPfannschmidtmannequin
      MannequinAuthor

      this means its much harder to have a mixin to change the behaviour of a property

      instead of super(Mixin, self).prop = foo

      the code is super(Mixin, type(self)).prop.__set__(self, foo)
      which is way harder to understand

      the attached file demonstrates the problem and has a proof of concept for an extended super allowing descriptor invocations

    2. bitdancer commented on Oct 30, 2012

      @bitdancer
      Member

      I believe this is a duplicate of bpo-14965. If you agree please add yourself to nosy there and review the proposed patch and/or make your own proposal. If you think your issue is different you can reopen this one.

    3. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      interpreter-core(Objects, Python, Grammar, and Parser dirs)type-featureA feature request or enhancement

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions