aroberge / reeborg

Enhanced Karel-the-robot clone
http://reeborg.ca/reeborg.html
Other
47 stars 36 forks source link

function or def ? #234

Closed statkclee closed 8 years ago

statkclee commented 8 years ago

I think function should be def. because def is a reserved keyword.

9.2. Defining functions function is our first Python keyword. Keywords are words that have a special meaning in a given programming language. Notice how a colon : precedes what is known as a block of code and constitutes the body of the function. It is required in Python to indent such blocks of code with the same number of spaces at the beginning of each line which, as a side-effect, makes it easy to identify the function body for a human reader.

aroberge commented 8 years ago

This is a mistake; the very first tutorial I wrote for this version was for Javascript (it still exists somewhere) and I used it as a template for the first Python tutorial. I will fix this.