[Tutor] How to deal failed function and 0xDEADBEEF type errors...
Alan Gauld
alan.gauld at btinternet.com
Fri Jul 16 08:35:00 CEST 2010
"Sean Carolan" <scarolan at gmail.com> wrote
> Run it by itself and there's no output:
>
> testNestEggFixed
>
> Try to print it and it throws this error:
>
> print testNestEggFixed
> <function testNestEggFixed at 0x0214D5F0>
>
> What am I missing here?
parentheses?
I assume you are from a Visual VBasic background?
Unlike VB Python requires you to have the parentheses
after the function name, even if there is nothing inside them.
Otherwise you are referring to a function *object* - which
is what the print statement told you...
HTH,
--
Alan Gauld
Author of the Learn to Program web site
http://www.alan-g.me.uk/
I even tried running all the code in the test
> function in my script and it works fine. It only fails when it's
> put
> into a function. I think I must be doing something wrong.
> _______________________________________________
> Tutor maillist - Tutor at python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor
>
More information about the Tutor
mailing list