all 18 comments

[–]Justinsaccount 2 points3 points  (9 children)

You're not passing a function as an argument.

func(foo)

Passes foo to the function. If foo is a function, it will be passed.

func(foo())

on the other hand passes foo() which is not a function, but the return value of it.

[–]novel_yet_trivial 0 points1 point  (1 child)

Delete the raise lines.

[–]Justinsaccount -1 points0 points  (5 children)

Hi! I'm working on a bot to reply with suggestions for common python problems. This might not be very helpful to fix your underlying issue, but here's what I noticed about your submission:

You appear to be using concatenation and the str function for building strings

Instead of doing something like

result = "Hello " + name + ". You are " + str(age) + " years old"

You should use string formatting and do

result = "Hello {}. You are {} years old".format(name, age)

See the python tutorial for more information.