Message255663
> Just FYI, 'super' is not a type
No, super is a type:
>>> super
<type 'super'>
It's one of 3 types defined in Objects/typeobject.c:
PyBaseObject_Type : "object"
PyType_Type : "type"
PySuper_Type : "super"
A super instance (CPython superobject) has the following members:
__thisclass__ : the class invoking super()
__self__ : the instance invoking super()
__self_class__ : the type of the instance invoking super()
super has a cutsom __getattribute__ (tp_getattro) slot, super_getattro, which proxies attribute access starting at the parent/sibling of __thisclass__ in the __mro__ of __self_class__.
super even defines a __get__ descriptor (tp_descr_get) method, super_descr_get, though I've never used it as such. |
|
Date |
User |
Action |
Args |
2015-12-01 16:59:08 | eryksun | set | recipients:
+ eryksun, georg.brandl, ezio.melotti, eric.araujo, r.david.murray, docs@python, martin.panter, Juchen Zeng |
2015-12-01 16:59:08 | eryksun | set | messageid: <1448989148.91.0.738811162565.issue25772@psf.upfronthosting.co.za> |
2015-12-01 16:59:08 | eryksun | link | issue25772 messages |
2015-12-01 16:59:08 | eryksun | create | |
|