Given the example function:
def FooBar(foo_exp):
if Bar:
update_Foo(foo_exp)
FooBar(foo_exp)
else:
newNode = fooNode(foo_exp)
print "The value of newNode is ",newNode
return newNode
The following results when called with a = FooBar(foo_exp):
The Value of NewNode is foo_exp - When called inside the class FooBar
But the variable a is populated with a value of type None
(As if the function returned nothing)
Would the recursion in this function cause this? Is there some other factor at play?
A = Type None even when return NewNode is commented out. This leads me to believe Python returns type None on functions without an explicit return Value.
Barvariable come from? Is it a global?rootnodecome from?FooBaras well--preferably a self-contained program that we can simply copy and paste and run.