Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed1.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.009 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'constructor': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'called.': 0.16; 'ends,': 0.16; 'executed.': 0.16; "object's": 0.16; 'opposite': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'wrote:': 0.18; 'header:User- Agent:1': 0.23; 'certain': 0.27; 'gets': 0.27; 'header:X -Complaints-To:1': 0.27; 'correct': 0.29; 'asked': 0.31; 'could': 0.34; 'but': 0.35; 'there': 0.35; 'charset:us-ascii': 0.36; 'application': 0.37; 'question,': 0.38; 'to:addr:python-list': 0.38; 'sure': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'simply': 0.61; "you're": 0.61; 'myself': 0.63; 'processed,': 0.84 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Dave Angel Subject: Re: opposite of __init__.py Date: Mon, 19 Aug 2013 18:48:36 +0000 (UTC) References: <52124C53.1040401@googlemail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: 174.32.174.30 User-Agent: XPN/1.2.6 (Street Spirit ; Linux) 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: 30 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1376938143 news.xs4all.nl 15977 [2001:888:2000:d::a6]:60571 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:52703 Tamer Higazi wrote: > Hi people! > > I have asked myself a question, if there is a opposite of "__init__.py" > like "__del__.py" ?! Others have answered your question, but I wanted to correct a misunderstanding: > > I want, that when the application ends, certain functions are executed. > I know I could make a constructor and a destructor, Not sure what you're talkiing about, but you cannot be sure that an object's destructor ( __del__() ) will ever be called. If you want to make sure that a particular object gets processed, one approach is the with- syntax. > but I simply want to > know if there is a opposite.... > -- DaveA