Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news.stack.nl!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.022 X-Spam-Evidence: '*H*': 0.96; '*S*': 0.00; 'function,': 0.09; 'method,': 0.09; 'cc:addr:python-list': 0.11; 'python': 0.11; 'callable': 0.16; 'closure,': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'pid,': 0.16; 'roy': 0.16; 'subject: \n ': 0.16; 'subject:More': 0.16; 'wrote:': 0.18; 'feb': 0.22; 'cc:addr:python.org': 0.22; 'affects': 0.24; 'cc:2**0': 0.24; 'header:In-Reply-To:1': 0.27; 'function': 0.29; 'chris': 0.29; 'am,': 0.29; 'message-id:@mail.gmail.com': 0.30; 'implicit': 0.31; 'subject:other': 0.31; 'fri,': 0.33; 'received:google.com': 0.35; '14,': 0.36; 'object,': 0.36; 'next': 0.36; '(from': 0.39; 'kind': 0.63; 'smith': 0.68; 'article': 0.77; 'subject:!)': 0.84; 'subject:via': 0.84; 'to:none': 0.92; 'state.': 0.95 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=JQLpDaZ+GK4ckZtUzmpb9loot8SRaWnj48BwictfVvg=; b=hnT6rg0A0aYxGijT71dbMJr1tVN1fa2k/izXcaLPCeC9Fzhfr/K2mD9Yd9AqxFoGbW JXLqOicUnIqaKtH70gJWtZS4bnn+MMrYlzYAyd5DKCK5it16Pl230FDbUqVHsG0EMxIH gjW1e5UuULsGDfR6dQaSW1NRmwY0LIIhs55yR6DRGlLdqboJgjm5DzKwyHKLZRYyDA37 p4nxY9BGfnXhwGLAEHpkJgcxXEEkjoqh4Eblb3oEwim3Y8Sbz3cvmUcidFmjV5KSJqpq TCnUB5vs8CGKuqND2CxInipXruf/zT/yyPSSvI2phquTV5RPbZBDJ8j6HPi/TeF2ECDh tKhA== MIME-Version: 1.0 X-Received: by 10.66.25.241 with SMTP id f17mr3620481pag.127.1392319077052; Thu, 13 Feb 2014 11:17:57 -0800 (PST) In-Reply-To: References: <85c2698c-d681-4511-b111-bb1e549ece93@googlegroups.com> <52f9c392$0$11128$c3e8da3@news.astraweb.com> <52fc45e6$0$11128$c3e8da3@news.astraweb.com> Date: Fri, 14 Feb 2014 06:17:56 +1100 Subject: Re: PyWart: More surpises via "implict conversion to boolean" (and other steaming piles!) From: Chris Angelico Cc: "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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 18 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1392319086 news.xs4all.nl 2950 [2001:888:2000:d::a6]:47869 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:66210 On Fri, Feb 14, 2014 at 1:58 AM, Roy Smith wrote: > In article , > Chris Angelico wrote: > >> Whether it's a module-level function, a bound method, a closure, or a >> callable object, a zero-arg function in Python always has some kind of >> implicit state. > > Sometimes, it has a *lot* of implicit state: > > os.fork() os.fork() always returns 0, so it *clearly* has no state whatsoever. It also always returns the next available PID, which is only a small amount of extra state (from the OS). Nothing else affects its return value! ChrisA