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 Kent Johnson other posts by this author
Nov 4 2009 5:44PM messages near this date
Re: [Tutor] parameters vs arguments | [Tutor] probando el email / mail test
On Wed, Nov 4, 2009 at 8:08 PM, Kristin Wilcox <wilcoxwork@[...].com>  wrote:
>  I'm reading stuff from multiple sources, and it seems to me like the words
>  "parameters" and "arguments" are used interchangeably. But I'm not sure if
>  this is a wrong perception, due to my lack of understanding, or if these
>  terms are truly synonyms.

Wikipedia has a nice description:
http://en.wikipedia.org/wiki/Parameter_%28computer_science%29#Parameters_and_arguments

Short view - technically, parameters are the variables in the function
and arguments are the values given to the variables at the point of
call. So outside the function, it is more common to talk about
arguments. Inside the function, you can really talk about either.
>  When I define, say, function example like this...
>  def example(x,y):
> 
>  are x and y arguments? or parameters?

Parameters that will take on the value of the arguments passed to the function.

>  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.

>  I actually thought x and y would be referred to as arguments in both cases,
>  but then sometimes I think I hear them called parameters.
> 
>  Help? Am I missing some nuances here?

Not really, it is not an important distinction.

Kent
_______________________________________________
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