Path: csiph.com!au2pb.net!feeder.erje.net!1.eu.feeder.erje.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed8.news.xs4all.nl!nzpost1.xs4all.net!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'essentially': 0.04; 'convention,': 0.09; 'definition,': 0.09; 'guys!': 0.09; 'namespace': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'subject:Modules': 0.09; 'jan': 0.11; 'def': 0.13; 'bind': 0.16; 'binding.': 0.16; 'dots': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'reedy': 0.16; 'subject:Learning': 0.16; 'wrote:': 0.16; 'stick': 0.18; 'arguments': 0.22; 'parameter': 0.22; 'variables.': 0.22; 'pass': 0.22; '(or': 0.23; 'consistent': 0.23; 'header:In-Reply-To:1': 0.24; 'header': 0.24; 'header:User-Agent:1': 0.26; 'header:X -Complaints-To:1': 0.26; 'parameters': 0.27; 'function': 0.28; 'looks': 0.29; 'follows': 0.29; 'objects': 0.29; 'call.': 0.30; 'convention': 0.30; 'everyone': 0.31; 'call,': 0.33; 'int': 0.33; 'except': 0.34; 'sometimes': 0.35; 'but': 0.36; 'to:addr:python- list': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'received:org': 0.37; 'names': 0.38; 'thank': 0.38; 'takes': 0.39; 'rather': 0.39; 'to:addr:python.org': 0.40; 'binding': 0.66; 'helping': 0.67; 'lol.': 0.72; 'received:fios.verizon.net': 0.91 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Terry Reedy Subject: Re: Learning Modules, Arguments, Parameters (imma noob) Date: Fri, 25 Sep 2015 20:08:01 -0400 References: <7ad8941d-04aa-42c5-82e9-10cdf02ab695@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: pool-173-59-124-74.phlapa.fios.verizon.net User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 In-Reply-To: X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 24 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1443226102 news.xs4all.nl 23823 [2001:888:2000:d::a6]:51345 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:97131 On 9/25/2015 2:50 PM, Cody Cox wrote: > Awesome guys! Thank you for helping me understand this material. > Parameters and Arguments are tricky. Looks like its mainly a game of > connect the dots with variables. lol. If you stick with the convention that parameters are names in the header of a function definition, arguments are objects in a function call, and calls bind parameter names to argements (or sometimes collected arguments), then it is not so tricky. But also remember that not everyone follows this convention, or even any consistent usage. To reiterate about calling and binding. def f(x): pass f(2) binds the name 'x' to the int object with value 2. This is essentially the same as 'x = 2', except that the binding takes place in the local namespace of the function rather than in the local namespace of the call. -- Terry Jan Reedy