Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed1a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.033 X-Spam-Evidence: '*H*': 0.93; '*S*': 0.00; 'interpreter': 0.05; 'subject:Why': 0.09; 'cc:addr:python-list': 0.11; 'python': 0.11; 'wrote:': 0.18; 'feb': 0.22; '>>>': 0.22; 'email addr:gmail.com>': 0.22; 'cc:addr:python.org': 0.22; '>>>': 0.24; 'cc:2**0': 0.24; 'cc:no real name:2**0': 0.24; '>': 0.26; 'header:In-Reply-To:1': 0.27; "doesn't": 0.30; 'message-id:@mail.gmail.com': 0.30; 'url:mailman': 0.30; 'this.': 0.32; 'url:python': 0.33; 'subject:the': 0.34; 'but': 0.35; 'received:google.com': 0.35; 'curious': 0.36; 'url:listinfo': 0.36; 'method': 0.36; 'url:org': 0.36; 'skip:& 10': 0.38; 'skip:[ 10': 0.38; 'pm,': 0.38; 'does': 0.39; 'url:mail': 0.40; 'to:addr:gmail.com': 0.65; 'upper': 0.74; 'deal,': 0.93 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=UVpslbNpvKgi9ebaJkKaOdzVrupuYzVJuzn/KkoV49U=; b=r2NEe/SxjqmQG2XKu8QsAHwdlsmKZpvUz7Y8tt86hLU1jTNM4y7XaptaW8gxrNQzLD fl8yHsGuBgtxdxJPewVWhVCDDxFo2Rt9oIaaq7bb4lmG/ctpRFkMsHUEvNSC30s9WRIS cyi42f6g7V8wn3TuS0QoAna7O+7nfOsfTH8d572/axHPNPIj7Xom2ACV3Ln5Aboizqec 2gdCcMbrAvYt6mF51QzifWZS7joqy8N8O8DBDfroQpzKR+XxY/52y/FXiZOrEzDPRxOg A7N0p6itMP5MbHbGAPOQTU4Rq+uJKMiZIw2/qfEn8Sh+v/WPbPqJK6AyfGYo1ZjzS1Kf ud3g== MIME-Version: 1.0 X-Received: by 10.52.29.113 with SMTP id j17mr11531987vdh.22.1392656917573; Mon, 17 Feb 2014 09:08:37 -0800 (PST) In-Reply-To: <9b80c233-ad31-44c8-8a6e-9002ab11bd0d@googlegroups.com> References: <9b80c233-ad31-44c8-8a6e-9002ab11bd0d@googlegroups.com> Date: Mon, 17 Feb 2014 12:08:37 -0500 Subject: Re: Why is the interpreter is returning a 'reference'? From: Joel Goldstick To: Nir Content-Type: multipart/alternative; boundary=20cf3079bf14ddd5a104f29d3427 Cc: python-list@python.org X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 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: 46 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1392656921 news.xs4all.nl 2967 [2001:888:2000:d::a6]:55938 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:66610 --20cf3079bf14ddd5a104f29d3427 Content-Type: text/plain; charset=UTF-8 On Feb 17, 2014 12:05 PM, "Nir" wrote: > > >>> k = ['hi','boss'] > >>> > >>> k > ['hi', 'boss'] > >>> k= [s.upper for s in k S.upper() > >>> k > [, ] > > Why doesn't the python interpreter just return > ['HI, 'BOSS'] ? > > This isn't a big deal, but I am just curious as to why it does this. > -- > https://mail.python.org/mailman/listinfo/python-list --20cf3079bf14ddd5a104f29d3427 Content-Type: text/html; charset=UTF-8


On Feb 17, 2014 12:05 PM, "Nir" <nirchernia@gmail.com> wrote:
>
> >>> k = ['hi','boss']
> >>>
> >>> k
> ['hi', 'boss']
> >>> k= [s.upper for s in k
S.upper()
> >>> k
> [<built-in method upper of str object at 0x00000000021B2AF8>, <built-in method upper of str object at 0x0000000002283F58>]
>
> Why doesn't the python interpreter just return
> ['HI, 'BOSS'] ?
>
> This isn't a big deal, but I am just curious as to why it does this.
> --
> https://mail.python.org/mailman/listinfo/python-list

--20cf3079bf14ddd5a104f29d3427--