Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #65294
| Path | csiph.com!usenet.pasdenom.info!gegeweb.org!usenet-fr.net!proxad.net!feeder1-2.proxad.net!news.tele.dk!news.tele.dk!small.news.tele.dk!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <rosuav@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.001 |
| X-Spam-Evidence | '*H*': 1.00; '*S*': 0.00; 'python.': 0.02; 'subsequent': 0.05; 'canvas': 0.07; 'explicit': 0.07; 'bits': 0.09; 'forcing': 0.09; 'referenced': 0.09; 'useless': 0.09; 'cc:addr:python-list': 0.11; 'python': 0.11; 'ctypes.': 0.16; 'fire,': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'object()': 0.16; 'roy': 0.16; 'scrub': 0.16; 'throw': 0.16; ':-)': 0.16; 'wrote:': 0.18; 'stack': 0.19; 'feb': 0.22; '>>>': 0.22; 'manual': 0.22; 'cc:addr:python.org': 0.22; 'pointer': 0.24; 'mon,': 0.24; 'cc:2**0': 0.24; 'references': 0.26; 'gets': 0.27; 'header:In-Reply-To:1': 0.27; '[1]': 0.29; 'am,': 0.29; 'message-id:@mail.gmail.com': 0.30; '"",': 0.31; "d'aprano": 0.31; 'steven': 0.31; 'file': 0.32; '(most': 0.33; 'subject:the': 0.34; 'anywhere': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'really': 0.36; 'ram': 0.36; 'possible': 0.36; 'list': 0.37; 'recent': 0.39; 'does': 0.39; 'catch': 0.60; 'fire': 0.65; 'here': 0.66; 'smith': 0.68; 'article': 0.77; 'lack': 0.78; 'attacking': 0.84; 'to:none': 0.92; 'serious': 0.97 |
| 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:cc :content-type; bh=FZ3UD6lI8daCtrCAa6wjzma8w63XUzmQAVjbIJ/Yzlg=; b=OgxE/R+YgfY/JvT5t1js2VZBPLo0OdBg1muYnyrwfNLA/kcoPP4alGi/Kz7MBydVf7 gfKEZB9425RC+a4rUM4wlodgU1du8cxF1nb1DBzzIV45O04Td9gHwzOIopx17OzlSZ46 gCompFHnz0/3ZyN2BRpIaXcaO74jEFjmow2IGyzD7sx5Rt93Rsrp9H+tEwM8TmwuLIJ6 tQ+g4bbkUG9LRbbIzqxHWUlSXaSe1VITx0cB/Max+j/IEsfwOjI/NwtYP3rbiN8gcWqi nv4Othb7DAbv9XzkEj/Ei2chuUiRI62LXx2f4OGLthAQHbyv1uCPtvwflDKew5PslByl zoKg== |
| MIME-Version | 1.0 |
| X-Received | by 10.68.244.103 with SMTP id xf7mr33988940pbc.50.1391383671606; Sun, 02 Feb 2014 15:27:51 -0800 (PST) |
| In-Reply-To | <bl81skFh14iU1@mid.individual.net> |
| References | <lcgtpf$tui$1@ger.gmane.org> <lcgut2$b8r$1@ger.gmane.org> <858utviwgs.fsf@benfinney.id.au> <lchce7$44q$1@ger.gmane.org> <52EC3C40.7080402@stoneleaf.us> <mailman.6251.1391224639.18130.python-list@python.org> <52ec84bc$0$29972$c3e8da3$5496439d@news.astraweb.com> <roy-5740C1.00250401022014@news.panix.com> <bl81skFh14iU1@mid.individual.net> |
| Date | Mon, 3 Feb 2014 10:27:51 +1100 |
| Subject | Re: __init__ is the initialiser |
| From | Chris Angelico <rosuav@gmail.com> |
| Cc | "python-list@python.org" <python-list@python.org> |
| Content-Type | text/plain; charset=UTF-8 |
| 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.6313.1391383680.18130.python-list@python.org> (permalink) |
| Lines | 43 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1391383680 news.xs4all.nl 2965 [2001:888:2000:d::a6]:54937 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:65294 |
Show key headers only | View raw
On Mon, Feb 3, 2014 at 10:15 AM, Gregory Ewing
<greg.ewing@canterbury.ac.nz> wrote:
> Roy Smith wrote:
>>
>> In article <52ec84bc$0$29972$c3e8da3$5496439d@news.astraweb.com>,
>> Steven D'Aprano <steve+comp.lang.python@pearwood.info> wrote:
>>
>>> A dubious analogy, since there are artists who would say that attacking
>>> the canvas with a knife and setting the remains on fire count as a form of
>>> artistic creation :-)
>>
>>
>> That's __del__()
>
>
> But it only works if the canvas is not referenced
> anywhere in any art catalogues. Otherwise the
> canvas fails to catch fire, and gets put on a
> list of list of artworks to be considered for
> manual incineration.
What you see here is proof that Python really does need an explicit
destroy() function. It would need to recycle the object [1], forcing
all references to it to dangle:
>>> a = object()
>>> b = a
>>> destroy(a)
>>> c = b
Traceback (most recent call last):
File "<pyshell#89>", line 1, in <module>
c = b
SegmentationError: dereferencing a dangling pointer
It's a serious lack in Python. Currently it's not possible to do this
without fiddling around in ctypes.
ChrisA
[1] Scrub the RAM clean and return it to the computer, put the 1 bits
onto the stack for subsequent reuse, and throw all the useless 0 bits
out onto the heap.
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: __init__ is the initialiser Terry Reedy <tjreedy@udel.edu> - 2014-01-31 22:16 -0500
Re: __init__ is the initialiser Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-02-01 05:23 +0000
Re: __init__ is the initialiser Roy Smith <roy@panix.com> - 2014-02-01 00:25 -0500
Re: __init__ is the initialiser Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2014-02-03 12:15 +1300
Re: __init__ is the initialiser Chris Angelico <rosuav@gmail.com> - 2014-02-03 10:27 +1100
Re: __init__ is the initialiser Roy Smith <roy@panix.com> - 2014-02-02 18:40 -0500
Re: __init__ is the initialiser Chris Angelico <rosuav@gmail.com> - 2014-02-03 11:07 +1100
Re: __init__ is the initialiser Devin Jeanpierre <jeanpierreda@gmail.com> - 2014-02-02 17:24 -0800
Re: __init__ is the initialiser Chris Angelico <rosuav@gmail.com> - 2014-02-03 12:37 +1100
Re: __init__ is the initialiser Devin Jeanpierre <jeanpierreda@gmail.com> - 2014-02-02 17:54 -0800
Re: __init__ is the initialiser Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2014-02-03 08:44 -0500
Re: __init__ is the initialiser Nicholas Cole <nicholas.cole@gmail.com> - 2014-02-03 13:50 +0000
Re: __init__ is the initialiser Ian Kelly <ian.g.kelly@gmail.com> - 2014-02-03 10:44 -0700
Re: __init__ is the initialiser Chris Angelico <rosuav@gmail.com> - 2014-02-04 04:57 +1100
Re: __init__ is the initialiser Nicholas Cole <nicholas.cole@gmail.com> - 2014-02-03 19:57 +0000
Re: __init__ is the initialiser Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2014-02-03 19:38 -0500
Re: __init__ is the initialiser Dave Angel <davea@davea.name> - 2014-02-02 19:35 -0500
Re: __init__ is the initialiser Roy Smith <roy@panix.com> - 2014-02-02 19:45 -0500
Re: __init__ is the initialiser Dave Angel <davea@davea.name> - 2014-02-02 22:14 -0500
Re: __init__ is the initialiser Skip Montanaro <skip@pobox.com> - 2014-02-02 21:15 -0600
Re: __init__ is the initialiser Dave Angel <davea@davea.name> - 2014-02-03 00:06 -0500
Re: __init__ is the initialiser Roy Smith <roy@panix.com> - 2014-02-03 00:12 -0500
Re: __init__ is the initialiser Chris Angelico <rosuav@gmail.com> - 2014-02-03 16:49 +1100
Re: __init__ is the initialiser Ethan Furman <ethan@stoneleaf.us> - 2014-02-02 21:34 -0800
Re: __init__ is the initialiser Rustom Mody <rustompmody@gmail.com> - 2014-01-31 21:31 -0800
csiph-web