Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #6633

Re: scope of function parameters

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <moky.math@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.011
X-Spam-Evidence '*H*': 0.98; '*S*': 0.00; 'int': 0.05; 'cool.': 0.09; 'subject:parameters': 0.09; 'syntax': 0.11; '>>>': 0.12; 'def': 0.12; 'subject:function': 0.16; 'received:74.125.82.174': 0.16; 'received:mail-wy0-f174.google.com': 0.16; 'cc:addr:python-list': 0.17; 'header:In-Reply-To:1': 0.21; 'cc:2**0': 0.22; 'cc:no real name:2**0': 0.23; 'invalid': 0.25; 'missed': 0.26; 'object': 0.26; 'example': 0.27; 'thanks': 0.28; 'cc:addr:python.org': 0.30; "i've": 0.33; '...': 0.34; 'file': 0.34; 'thinking': 0.34; 'header :User-Agent:1': 0.35; '"",': 0.35; 'message-id:@gmail.com': 0.36; 'received:google.com': 0.37; 'something': 0.37; 'received:74.125.82': 0.38; 'received:74.125': 0.38; 'could': 0.38; 'but': 0.38; 'subject:: ': 0.38; 'here.': 0.69; 'learned': 0.73; 'to:none': 0.93
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:message-id:date:from:user-agent:mime-version:cc :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=t+5Ezu863hERmvirLLE4uKhOJ0pbc/9iKdkoKDdJzyM=; b=brKcvAe3aBeGYgtsX0M5Pgcc/wJ7KW+A5gzAjzFT0P799AViby9YFMIMu6TQv8+dF2 fxwvw3/rqYaiU4DG6FpnW9k2Z+/uGcWAdEDdi1VfoL6dHJ3e01DnH8ZBsSdk6+TJd7WL nS3oWPHm7qgrNEAOgnMUjvdgUGNywKbrQKZyM=
DomainKey-Signature a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:cc:subject:references :in-reply-to:content-type:content-transfer-encoding; b=vGsXSDscKzJ6wajs27BSxugLCR9k4So9vo3cLrSThXBB5p0PMDMeL9s3D4L6JI3D4c fSzpPdjcSL1l6MnraVU0ZFoH0tIPcAYe7plZEL/2iE9t+2svY/ZdRpxPzeYUGcq4+9SE n6iuOiUN/mt5I7FjwMYMBq4OtenH4iLpBKlVw=
Date Mon, 30 May 2011 09:38:05 +0200
From Laurent <moky.math@gmail.com>
User-Agent Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.13) Gecko/20101208 Thunderbird/3.1.7
MIME-Version 1.0
CC python-list@python.org
Subject Re: scope of function parameters
References <mailman.2216.1306661462.9059.python-list@python.org> <94fdk7FihlU1@mid.individual.net> <87tycd89qc.fsf@benfinney.id.au> <irvg1f$qb$1@news.univ-fcomte.fr> <BANLkTinntDVRZ_WopK9+ddf_eqtAVTBFMQ@mail.gmail.com>
In-Reply-To <BANLkTinntDVRZ_WopK9+ddf_eqtAVTBFMQ@mail.gmail.com>
Content-Type text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding 7bit
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.2253.1306741088.9059.python-list@python.org> (permalink)
Lines 28
NNTP-Posting-Host 82.94.164.166
X-Trace 1306741088 news.xs4all.nl 49039 [::ffff:82.94.164.166]:46305
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:6633

Show key headers only | View raw


>>  Could you give an example of an object that has no name ? I've missed
>>  something ...
>
> def foo():
>      return 5
>
> print(foo())
>
> The int object 5 has no name here.

Cool. I was thinking that "5" was the name, but
 >>> 5.__add__(6)
   File "<stdin>", line 1
     5.__add__(6)
             ^
SyntaxError: invalid syntax

while

 >>> a=5
 >>> a.__add__(6)
11


Very well. I learned something today.
Thanks
Laurent

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

scope of function parameters Henry Olders <henry.olders@mcgill.ca> - 2011-05-29 04:30 -0400
  Re: scope of function parameters Mel <mwilson@the-wire.com> - 2011-05-29 07:59 -0400
    Re: scope of function parameters Terry Reedy <tjreedy@udel.edu> - 2011-05-29 16:27 -0400
  Re: scope of function parameters Peter Pearson <ppearson@nowhere.invalid> - 2011-05-29 17:21 +0000
    Re: scope of function parameters Ben Finney <ben+python@benfinney.id.au> - 2011-05-30 07:42 +1000
      Re: scope of function parameters Laurent Claessens <moky.math@gmail.com> - 2011-05-30 09:12 +0200
        Re: scope of function parameters Chris Rebert <clp2@rebertia.com> - 2011-05-30 00:27 -0700
        Re: scope of function parameters Laurent <moky.math@gmail.com> - 2011-05-30 09:38 +0200
        Re: scope of function parameters Daniel Kluev <dan.kluev@gmail.com> - 2011-05-30 19:10 +1100
        Re: scope of function parameters Terry Reedy <tjreedy@udel.edu> - 2011-05-30 05:02 -0400
          Re: scope of function parameters Laurent Claessens <moky.math@gmail.com> - 2011-05-30 11:08 +0200
            Re: scope of function parameters Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-05-30 09:14 +0000
            Re: scope of function parameters Ben Finney <ben+python@benfinney.id.au> - 2011-05-30 19:17 +1000
            Re: scope of function parameters Peter Otten <__peter__@web.de> - 2011-05-30 11:41 +0200
              Re: scope of function parameters Laurent Claessens <moky.math@gmail.com> - 2011-05-30 12:10 +0200
              Re: scope of function parameters Laurent Claessens <moky.math@gmail.com> - 2011-05-30 12:10 +0200
            Re: scope of function parameters Jussi Piitulainen <jpiitula@ling.helsinki.fi> - 2011-05-30 13:40 +0300
            Re: scope of function parameters Terry Reedy <tjreedy@udel.edu> - 2011-05-30 12:49 -0400
        Re: scope of function parameters Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-05-30 09:16 +0000
  Re: scope of function parameters Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-05-29 23:46 +0000
    Re: scope of function parameters Ben Finney <ben+python@benfinney.id.au> - 2011-05-30 11:31 +1000
      Re: scope of function parameters Chris Angelico <rosuav@gmail.com> - 2011-05-30 11:56 +1000
        Re: scope of function parameters Ben Finney <ben+python@benfinney.id.au> - 2011-05-30 12:08 +1000
          Re: scope of function parameters Chris Angelico <rosuav@gmail.com> - 2011-05-30 12:37 +1000
      Re: scope of function parameters Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-05-30 04:23 +0000
  Re: scope of function parameters rusi <rustompmody@gmail.com> - 2011-05-31 09:46 -0700
    Re: scope of function parameters rusi <rustompmody@gmail.com> - 2011-05-31 10:33 -0700

csiph-web