ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> python-tutor
python-tutor
Re: [Tutor] parameters vs arguments
by Alan Gauld other posts by this author
Nov 4 2009 11:10PM messages near this date
Re: [Tutor] parameters vs arguments | Re: [Tutor] parameters vs arguments
"Kristin Wilcox" <wilcoxwork@[...].com>  wrote

>  I'm just starting to learn Python, and some of the vocabulary has me a 
>  bit
>  confused.

FWIW I take great care in my tutor to highlight and explain the terminology
of programming in my tutor. I italicise new words and explain them on first
use. So it might be useful taking a look there if you find areas of 
confusion.

>  I'm reading stuff from multiple sources, and it seems to me like the 
>  words
>  "parameters" and "arguments" are used interchangeably.

This is a confusing one and people often do get them mixed up.
Basically a parameter is what you call the thing used in the function 
definition.
An argument is whats used  when you call the function.
Thus, at invocation, the parameter takes on the value of the argument.

This is confused futher by some text books using the term "formal argument"
instead of parameter. When you see "formal argument" it does just mean a
parameter. Fortunately this usage is rare nowadays.

>  When I define, say, function example like this...
>  def example(x,y):
> 
>  are x and y arguments? or parameters?

parameters

>  And when I call the function and pass it values
> 
>  example(32,17) are those values arguments or parameters? I *thought* this
>  was called 'passing arguments'...

arguments

HTH


-- 
Alan Gauld
Author of the Learn to Program web site
http://www.alan-g.me.uk/ 


_______________________________________________
Tutor maillist  -  Tutor@[...].org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
Thread:
Kristin Wilcox
Modulok
Binto
Alan Gauld
Binto
Kent Johnson

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved