doc/sample.py

Module ([])
body
Expr ([1, 0])
1: """Example module to test pyRegurgitator"""
value
Str ([1, 0])
s 'Example module to test pyRegurgitator'
Assign ([3, 0])
3: __version__ = (0, 1, 0)
targets
Name ([3, 0])
id '__version__'
ctx
Store ([])
value
Tuple ([3, 15])
elts
Num ([3, 15])
n 0
Num ([3, 18])
n 1
Num ([3, 21])
n 0
ctx
Load ([])
ClassDef ([6, 0])
6: class Foo:
name 'Foo'
bases
keywords
starargs None
kwargs None
body
FunctionDef ([7, 4])
7:     def hi(self):
name 'hi'
args
arguments ([])
args
arg ([7, 11])
arg 'self'
annotation None
vararg None
kwonlyargs
kw_defaults
kwarg None
defaults
body
Expr ([8, 8])
8:         print('Hi, this is Foo')
value
Call ([8, 13])
func
Name ([8, 8])
id 'print'
ctx
Load ([])
args
Str ([8, 14])
s 'Hi, this is Foo'
keywords
starargs None
kwargs None
decorator_list
returns None
FunctionDef ([10, 4])
10:     @staticmethod
name 'add_4'
args
arguments ([])
args
arg ([11, 14])
arg 'num'
annotation None
vararg None
kwonlyargs
kw_defaults
kwarg None
defaults
body
Return ([12, 8])
12:         return 4 + num
value
BinOp ([12, 15])
left
Num ([12, 15])
n 4
op
Add ([])
right
Name ([12, 19])
id 'num'
ctx
Load ([])
decorator_list
Name ([10, 5])
id 'staticmethod'
ctx
Load ([])
returns None
decorator_list
ClassDef ([15, 0])
15: class Bar(Foo):
name 'Bar'
bases
Name ([15, 10])
id 'Foo'
ctx
Load ([])
keywords
starargs None
kwargs None
body
FunctionDef ([16, 4])
16:     def bar(self):
name 'bar'
args
arguments ([])
args
arg ([16, 12])
arg 'self'
annotation None
vararg None
kwonlyargs
kw_defaults
kwarg None
defaults
body
Expr ([17, 8])
17:         print('foobar')
value
Call ([17, 13])
func
Name ([17, 8])
id 'print'
ctx
Load ([])
args
Str ([17, 14])
s 'foobar'
keywords
starargs None
kwargs None
decorator_list
returns None
decorator_list