Title: super cannot invoke descriptors
Type: enhancement Stage: resolved
Components: Interpreter Core Versions: Python 3.2, Python 3.3, Python 3.4, Python 2.7
Status: closed Resolution: duplicate
Dependencies: Superseder: super() and property inheritance behavior
View: 14965
Assigned To: Nosy List: Ronny.Pfannschmidt, r.david.murray
Priority: normal Keywords:

Created on 2012-10-30 08:07 by Ronny.Pfannschmidt, last changed 2012-10-30 13:42 by r.david.murray. This issue is now closed.

File name Uploaded Description Edit Ronny.Pfannschmidt, 2012-10-30 08:07
Messages (2)
msg174184 - (view) Author: Ronny Pfannschmidt (Ronny.Pfannschmidt) Date: 2012-10-30 08:07
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
msg174211 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2012-10-30 13:42
I believe this is a duplicate of issue 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.
Date User Action Args
2012-10-30 13:42:37r.david.murraysetstatus: open -> closed

superseder: super() and property inheritance behavior

nosy: + r.david.murray
messages: + msg174211
resolution: duplicate
stage: resolved
2012-10-30 12:49:11berker.peksagsetversions: - Python 3.1, Python 3.5
2012-10-30 08:07:59Ronny.Pfannschmidtcreate