Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #68345
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed4a.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <ian.g.kelly@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.067 |
| X-Spam-Evidence | '*H*': 0.87; '*S*': 0.00; 'def': 0.12; 'troll': 0.16; 'exception': 0.16; 'wrote:': 0.18; 'thu,': 0.19; 'value.': 0.19; '>>>': 0.22; 'import': 0.22; 'header:In-Reply-To:1': 0.27; 'function': 0.29; 'chris': 0.29; 'skip:p 30': 0.29; 'raise': 0.29; 'message-id:@mail.gmail.com': 0.30; "i'm": 0.30; '13,': 0.31; 'moment': 0.34; 'received:google.com': 0.35; 'there': 0.35; 'subject:?': 0.36; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'to:addr:python.org': 0.39; 'subject:. ': 0.67; 'mar': 0.68; 'is!': 0.84 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=0sAIZ0izc/wRmk6pcCmFzOFY5u117Gl5d4hUKQTVgDc=; b=csoJCS1l2x3++Y8+hsxJUvXalUym4XaIxCmh71l7f0wTPSoVAgGLmxgailZb9m3cwo edpU4AzGB/9SC4HkcmVAsb2zQADWNQg0UppSkQf6BB+NfPyzSYLSnq5WSB8/WvRHLvJs wTVWBoM2D8t+VRJFbtRUyOLzAjKKkewm0KNo03xyE3Rh4m8K+fUkIKJkLUdLz4Nm8ayZ P2Cyv0GKOkJRDPI71e/CvBnRmJ2G+7xV4Y2dHIBjds8unILRrAQEOeAFBWA3hddrWVwD w16IaxZKLSTcVR0l3TXgcvBIZfqMU3BwVVjwopvZnzyWc8tKgvFuw5uaF3CDyPcLPonw IDhA== |
| X-Received | by 10.68.76.68 with SMTP id i4mr5540685pbw.73.1394755767857; Thu, 13 Mar 2014 17:09:27 -0700 (PDT) |
| MIME-Version | 1.0 |
| In-Reply-To | <CAPTjJmpufKDDnWRBusutSR4hdxVu8LvmBp9SXjYJmBjy7rx+4Q@mail.gmail.com> |
| References | <53206e6a$0$2886$e4fe514c@news2.news.xs4all.nl> <mailman.8093.1394636439.18130.python-list@python.org> <53207d77$0$2886$e4fe514c@news2.news.xs4all.nl> <5320e8c9$0$29994$c3e8da3$5496439d@news.astraweb.com> <roy-493F5F.07442713032014@news.panix.com> <87y50el1vf.fsf@elektro.pacujo.net> <5322420e$0$29994$c3e8da3$5496439d@news.astraweb.com> <CAPTjJmpufKDDnWRBusutSR4hdxVu8LvmBp9SXjYJmBjy7rx+4Q@mail.gmail.com> |
| From | Ian Kelly <ian.g.kelly@gmail.com> |
| Date | Thu, 13 Mar 2014 18:08:47 -0600 |
| Subject | Re: Deep vs. shallow copy? |
| To | Python <python-list@python.org> |
| Content-Type | text/plain; charset=ISO-8859-1 |
| 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.8136.1394755770.18130.python-list@python.org> (permalink) |
| Lines | 21 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1394755770 news.xs4all.nl 2950 [2001:888:2000:d::a6]:56745 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:68345 |
Show key headers only | View raw
On Thu, Mar 13, 2014 at 5:55 PM, Chris Angelico <rosuav@gmail.com> wrote:
> I'm going to troll for a moment and give you a function that has no
> return value.
>
> def procedure():
> raise Exception
>>> import dis
>>> dis.dis(procedure)
2 0 LOAD_GLOBAL 0 (Exception)
3 RAISE_VARARGS 1
6 LOAD_CONST 0 (None)
9 RETURN_VALUE
>>> def get_procedure_return_value():
... """Returns the return value of procedure()."""
... return procedure.__code__.co_consts[0]
...
>>> print(get_procedure_return_value())
None
Look, there it is!
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Deep vs. shallow copy? Alex van der Spek <zdoor@xs4all.nl> - 2014-03-12 14:25 +0000
Re: Deep vs. shallow copy? Skip Montanaro <skip@pobox.com> - 2014-03-12 09:48 -0500
Re: Deep vs. shallow copy? Zachary Ware <zachary.ware+pylist@gmail.com> - 2014-03-12 10:00 -0500
Re: Deep vs. shallow copy? Alex van der Spek <zdoor@xs4all.nl> - 2014-03-12 15:29 +0000
Re: Deep vs. shallow copy? Wayne Brehaut <wbrehaut@mcsnet.ca> - 2014-03-12 13:06 -0600
Re: Deep vs. shallow copy? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-03-12 23:07 +0000
Re: Deep vs. shallow copy? Rustom Mody <rustompmody@gmail.com> - 2014-03-12 20:09 -0700
Re: Deep vs. shallow copy? Ian <hobson42@gmail.com> - 2014-03-13 11:38 +0000
Re: Deep vs. shallow copy? Rustom Mody <rustompmody@gmail.com> - 2014-03-13 08:28 -0700
Re: Deep vs. shallow copy? random832@fastmail.us - 2014-03-13 13:25 -0400
Re: Deep vs. shallow copy? Roy Smith <roy@panix.com> - 2014-03-13 07:44 -0400
Re: Deep vs. shallow copy? Marko Rauhamaa <marko@pacujo.net> - 2014-03-13 14:27 +0200
Re: Deep vs. shallow copy? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-03-13 23:41 +0000
Re: Deep vs. shallow copy? Chris Angelico <rosuav@gmail.com> - 2014-03-14 10:55 +1100
Re: Deep vs. shallow copy? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-03-14 01:41 +0000
Re: Deep vs. shallow copy? Ian Kelly <ian.g.kelly@gmail.com> - 2014-03-13 18:08 -0600
Re: Deep vs. shallow copy? Chris Angelico <rosuav@gmail.com> - 2014-03-14 11:22 +1100
Re: Deep vs. shallow copy? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-03-14 01:59 +0000
Re: Deep vs. shallow copy? Rustom Mody <rustompmody@gmail.com> - 2014-03-13 19:57 -0700
Re: Deep vs. shallow copy? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-03-14 04:43 +0000
Re: Deep vs. shallow copy? Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-03-14 06:17 +0000
Re: Deep vs. shallow copy? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-03-13 23:31 +0000
csiph-web