[Patches] [ python-Patches-1498363 ] Improve super() objects support for implicit method calls

SourceForge.net noreply at sourceforge.net
Tue Jun 27 14:22:47 CEST 2006


Patches item #1498363, was opened at 2006-05-31 13:31
Message generated for change (Comment added) made by collinwinter
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.

----------------------------------------------------------------------

>Comment By: Collin Winter (collinwinter)
Date: 2006-06-27 08:22

Message:
Logged In: YES 
user_id=1344176

The patch has been updated to reflect the current SVN state,
r47124.

----------------------------------------------------------------------

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