PageRenderTime 4ms CodeModel.GetById 2ms app.highlight 0ms RepoModel.GetById 1ms app.codeStats 0ms

/Demo/parser/source.py

http://unladen-swallow.googlecode.com/
Python | 27 lines | 20 code | 0 blank | 7 comment | 1 complexity | 34efe5f2bac3011af109b314b62ac8ce MD5 | raw file
 1"""Exmaple file to be parsed for the parsermodule example.
 2
 3The classes and functions in this module exist only to exhibit the ability
 4of the handling information extraction from nested definitions using parse
 5trees.  They shouldn't interest you otherwise!
 6"""
 7
 8class Simple:
 9    "This class does very little."
10
11    def method(self):
12        "This method does almost nothing."
13        return 1
14
15    class Nested:
16        "This is a nested class."
17
18        def nested_method(self):
19            "Method of Nested class."
20            def nested_function():
21                "Function in method of Nested class."
22                pass
23            return nested_function
24
25def function():
26    "This function lives at the module level."
27    return 0