[Python-mode] [ python-mode-Patches-828393 ] Improved py-current-defun (handles nesting)

SourceForge.net noreply at sourceforge.net
Wed Oct 22 14:11:12 EDT 2003


Patches item #828393, was opened at 2003-10-22 20:11
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=828393&group_id=86916

Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Per Cederqvist (ceder)
Assigned to: Nobody/Anonymous (nobody)
Summary: Improved py-current-defun (handles nesting)

Initial Comment:
The py-current-defun I wrote back in 1996 only works
well if
you have classes and functions at top level, and one
level of
methods in the classes.  If you nest a class statement
inside
a function, or if you have a function nested inside a
function,
it will not provide a good name.

The attached patch is a rewrite of the py-current-defun
that
handles any level of nesting.  If you have "class
Outer", which
contains "def method", which contains "class Inner", it
will
construct the name "Outer.method.Inner" for the inner
class.

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

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



More information about the Python-mode mailing list