Message50385
The attached patch lets super() objects pass on
implicit __getitem__, __setitem__, __delitem__, __len__
and __hash__ calls. For example, to use len() with
super() objects, one must currently do something like
super(X, X()).__len__()
Likewise for __getitem__,
super(X, X()).__getitem__(item)
That's ugly.
This patch lets these be spelled as
len(super(X, X())) and super(X, X())[item], respectively.
The patch also includes documentation updates and tests
for the new functionality.
The patch was taken against r46582. |
|
Date |
User |
Action |
Args |
2007-08-23 15:52:25 | admin | link | issue1498363 messages |
2007-08-23 15:52:25 | admin | create | |
|