[Tutor] functions

D-Man dsh8290@rit.edu
Fri, 19 Jan 2001 13:34:07 -0500


On Fri, Jan 19, 2001 at 09:46:59AM -0800, Sean 'Shaleh' Perry wrote:
[snip]
| > What am I doing wrong?
| > 
| 
| you need to declare the function before you use it.
| 

Almost.  s/declare/define/  Unlike C and C++, Python doesn't have
separate "declaration" and "definition" statements.  In Python, "def"
is an executable statement that will create a function object and
create a binding to that object with the given name.  Once the
function object is created and bound to the name you can call it.


-D