Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #66609
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!us.feeder.erje.net!feeder.erje.net!eu.feeder.erje.net!weretis.net!feeder4.news.weretis.net!ecngs!feeder2.ecngs.de!novso.com!newsfeed.xs4all.nl!newsfeed4a.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <python-python-list@m.gmane.org> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.012 |
| X-Spam-Evidence | '*H*': 0.98; '*S*': 0.00; 'interpreter': 0.05; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'subject:Why': 0.09; 'python': 0.11; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'wrote:': 0.18; 'header:User- Agent:1': 0.23; 'header:X-Complaints-To:1': 0.27; 'header:In- Reply-To:1': 0.27; 'am,': 0.29; "doesn't": 0.30; '>>>>': 0.31; 'this.': 0.32; 'subject:the': 0.34; 'but': 0.35; 'add': 0.35; 'curious': 0.36; 'method': 0.36; 'skip:[ 10': 0.38; 'to:addr :python-list': 0.38; 'does': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'upper': 0.74; 'received:pacbell.net': 0.84; 'deal,': 0.93 |
| X-Injected-Via-Gmane | http://gmane.org/ |
| To | python-list@python.org |
| From | emile <emile@fenx.com> |
| Subject | Re: Why is the interpreter is returning a 'reference'? |
| Date | Mon, 17 Feb 2014 09:08:33 -0800 |
| References | <9b80c233-ad31-44c8-8a6e-9002ab11bd0d@googlegroups.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=ISO-8859-1; format=flowed |
| Content-Transfer-Encoding | 7bit |
| X-Gmane-NNTP-Posting-Host | adsl-69-226-129-65.dsl.pltn13.pacbell.net |
| User-Agent | Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 |
| In-Reply-To | <9b80c233-ad31-44c8-8a6e-9002ab11bd0d@googlegroups.com> |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <https://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 | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.7102.1392656931.18130.python-list@python.org> (permalink) |
| Lines | 23 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1392656931 news.xs4all.nl 2842 [2001:888:2000:d::a6]:56159 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:66609 |
Show key headers only | View raw
On 02/17/2014 09:00 AM, Nir wrote: >>>> k = ['hi','boss'] >>>> >>>> k > ['hi', 'boss'] >>>> k= [s.upper for s in k] s.upper is a reference to the method upper of s -- to execute the method add parens -- s.upper() Emile >>>> 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. >
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Why is the interpreter is returning a 'reference'? Nir <nirchernia@gmail.com> - 2014-02-17 09:00 -0800 Re: Why is the interpreter is returning a 'reference'? emile <emile@fenx.com> - 2014-02-17 09:08 -0800 Re: Why is the interpreter is returning a 'reference'? Joel Goldstick <joel.goldstick@gmail.com> - 2014-02-17 12:08 -0500 Re: Why is the interpreter is returning a 'reference'? Ned Batchelder <ned@nedbatchelder.com> - 2014-02-17 12:08 -0500 Re: Why is the interpreter is returning a 'reference'? Marko Rauhamaa <marko@pacujo.net> - 2014-02-17 19:09 +0200 Re: Why is the interpreter is returning a 'reference'? Zachary Ware <zachary.ware+pylist@gmail.com> - 2014-02-17 11:14 -0600 Re: Why is the interpreter is returning a 'reference'? John Gordon <gordon@panix.com> - 2014-02-17 19:17 +0000
csiph-web