#543 python language Function List Feature class|def Patch

Next_major_release
open
nobody
None
5
2013-12-14
2013-12-14
Metallicow
No

Here is a pic for ref.
http://img513.imageshack.us/img513/9397/efy1.png

This is a starter for the most part based on my code editor's re(which is pure python btw).
Since python is based on indentation, the class/def func list should be also,
so that ex: subclass's/subdef's show in the proper place in the list when not sorted.
Basically it just shows the class or def line with args, kwargs.
Though if it is possible to show all the args by parsing following lines in certain circumstances(args, kwargs are on more than one line for readability reasons/pep8/longline/etc.), tweaking this to get all the params(ex if on more than one line) would be especially nice.

Note: that class/def lines can also have # inline-comments on them. so don't break the re by not including them.

functionList.xml

association
langID="22" id="python"

      <parser id="python" displayName="Python" commentExpr="^[\t ]*((#.*?$))">
          <function
              mainExpr="^[\t ]*(class|def)[\s]+[\w]+[\(](.*?)$"
              displayMode="$functionName">
              <!--
              <functionName>
                  <nameExpr expr=""/>
              </functionName>
              -->
          </function>
      </parser>

Something of this nature should be included by default, since python is so closely related with the c families.

Please include this or something similar in the next version release.

Thanks.
Metalio Bovinus - Metallicow
SourceCoder Dev

Discussion

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks