I've just installed pyke using easy_install, with python 2.5.
I've downloaded the archive with the examples. When I open the Python shell and try to run the family_relations example, I get this:
>>> import test
File "<stdin>", line 1
SyntaxError: invalid syntax
What is the problem?
The square brackets in the call to test.fc_test were meant to mean that the parameter is optional. So either of the following calls would be legal:
It also means that the person1 parameter defaults to 'bruce' if you omit it. So the above two calls would act identically.
Since the function only has one default parameter, you can also omit the parameter name without any confusion:
Hope this helps!
Ok, sorry, my fault :D
It's just that seeing the Python prompt sumbol '>>>' I thought that was a command to copy and execute as it was. So, then, I looked for the error somewhere else.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.