blob: b90062851fe60b2bcc41b51e26f86c18eb6ea1a2 [file] [log] [blame]
Guido van Rossum16d27e31996-08-21 16:28:53 +00001"""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):
Guido van Rossum4117e541998-09-14 16:44:15 +000012 "This method does almost nothing."
13 return 1
Guido van Rossum16d27e31996-08-21 16:28:53 +000014
15 class Nested:
Guido van Rossum4117e541998-09-14 16:44:15 +000016 "This is a nested class."
Guido van Rossum16d27e31996-08-21 16:28:53 +000017
Guido van Rossum4117e541998-09-14 16:44:15 +000018 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
Guido van Rossum16d27e31996-08-21 16:28:53 +000024
25def function():
26 "This function lives at the module level."
27 return 0