[Python-mode] [ python-mode-Patches-1891749 ] Automatically insert super calls

SourceForge.net noreply at sourceforge.net
Tue Feb 12 08:09:17 CET 2008


Patches item #1891749, was opened at 2008-02-12 02:09
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=581351&aid=1891749&group_id=86916

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: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Carl Banks (aerojockey)
Assigned to: Nobody/Anonymous (nobody)
Summary: Automatically insert super calls

Initial Comment:
One of the more annoying and superfluous Python is the new style calls to the superclass, which involves retyping both the name of the class and the function.

This patch adds a new command to python-mode that inserts the empty super call with the appropriate class and function name, leaving the cursor in position to start typing arguments.  I have it bound to \C-c\C-f in this patch.  The patch also adds a whole new section to the mode documentation, since it's not really like any other command.


Example:

class hello(object):
    def world(slef):
        |

Then the typing \C-c\C-f would insert "super(hello,self).world()" at the given insertion point.

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

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=581351&aid=1891749&group_id=86916


More information about the Python-mode mailing list