[Tutor] problem with program
alan.gauld at yahoo.co.uk
Fri Oct 13 13:53:50 EDT 2017
On 13/10/17 13:04, Chris Coleman wrote:
> File "scripts/bird.py", line 4
> SyntaxError: invalid syntax
There are two problems here.
The first is that you need a space after the def.
The second is that there should be two underscores
on each side of init, so:
The double underscore is a common structure in
Python that indicates a method that is handled
in a special way by Python, they are often
called "dunder" methods. But it often catches
beginners out, especially if your tutorial font
does not make the double underscore obvious.
Author of the Learn to Program web site
Follow my photo-blog on Flickr at:
More information about the Tutor