[Patches] [ python-Patches-1498363 ] Improve super() objects support for implicit method calls
SourceForge.net
noreply at sourceforge.net
Wed May 31 19:31:43 CEST 2006
Patches item #1498363, was opened at 2006-05-31 13:31
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1498363&group_id=5470
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Core (C code)
Group: Python 2.5
Status: Open
Resolution: None
Priority: 5
Submitted By: Collin Winter (collinwinter)
Assigned to: Nobody/Anonymous (nobody)
Summary: Improve super() objects support for implicit method calls
Initial Comment:
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.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1498363&group_id=5470
More information about the Patches
mailing list