Path: csiph.com!goblin2!goblin.stu.neva.ru!newsfeed.xs4all.nl!newsfeed7.news.xs4all.nl!news.tele.dk!news.tele.dk!small.news.tele.dk!newsgate.cistron.nl!newsgate.news.xs4all.nl!nzpost1.xs4all.net!not-for-mail Return-Path: 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; 'subject:Python': 0.05; 'context': 0.05; 'escape': 0.07; 'exception.': 0.07; 'extent': 0.07; 'bits.': 0.09; 'received:internal': 0.09; 'argument': 0.15; 'result.': 0.15; 'thu,': 0.15; '"for"': 0.16; 'boolean': 0.16; 'expected,': 0.16; 'expression.': 0.16; 'increment': 0.16; 'languages)': 0.16; 'lisp': 0.16; 'message- id:@webmail.messagingengine.com': 0.16; 'received:10.202': 0.16; 'received:10.202.2': 0.16; 'received:66.111': 0.16; 'received:66.111.4': 0.16; 'received:messagingengine.com': 0.16; 'wrote:': 0.16; 'result,': 0.18; 'context.': 0.22; 'function,': 0.22; 'sep': 0.22; 'header:In-Reply-To:1': 0.24; 'error': 0.27; '(e.g.': 0.27; 'not.': 0.27; 'raise': 0.29; "d'aprano": 0.33; 'steven': 0.33; 'definition': 0.34; 'could': 0.35; 'something': 0.35; 'needed': 0.36; '(and': 0.36; 'assigned': 0.36; 'to:addr :python-list': 0.36; 'subject:: ': 0.37; 'received:10': 0.37; 'being': 0.37; 'say': 0.37; 'received:66': 0.38; 'or,': 0.38; 'does': 0.39; 'to:addr:python.org': 0.40; 'where': 0.40; 'some': 0.40; 'easy': 0.60; 'from:no real name:2**0': 0.60; 'header :Message-Id:1': 0.61; 'within': 0.64; 'positions': 0.64; 'special': 0.73; 'nonsense.': 0.84; 'thing,': 0.93; 'imagine': 0.96 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.us; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=fUTvPuS/4F8nez/h5Wnl6FjKBo8=; b=Sq4DG5 IBAnQKBm81ymoh4f23mneVXdkmaLkQ/pUM8lQHFeNqRrOTJPJKFHhhnYQ99sSB+D QaLgA/67IjeGizHIO8W/oIEADU1/HnSkrGlfScosU51Gizk5L07z6P+Y6VRsZ1gI wqzn7yw+DVf96mirXwnhviXsugcNdfuZYbdIQ= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=fUTvPuS/4F8nez/ h5Wnl6FjKBo8=; b=QWB0lp/5XkMkm71zWS58xp+veegaHqNG13IW4qZFq4woewV C6p/TJQmu+8IRLbNUORy6LWL3mOsHI3A7dwTTlMU7evLEmC6QoBsqxUgeMfRDq7p ZpfRANO4z2a85tfwJ6BHbMz7cU4AoRdRzcEwkdhK+XAA9PM/zB2mgAax8pyE= X-Sasl-Enc: tnKBYFarrz5TsmfPeenUYAVSy7aT8pysP6d+p+B8R3Zm 1441917020 From: random832@fastmail.us To: python-list@python.org MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain X-Mailer: MessagingEngine.com Webmail Interface - ajax-c76b43ce Subject: Re: Python handles globals badly. Date: Thu, 10 Sep 2015 16:30:20 -0400 In-Reply-To: <55f1c85d$0$1638$c3e8da3$5496439d@news.astraweb.com> References: <86fa425b-d660-45ba-b0f7-3beebdec8e14@googlegroups.com> <55EE9EEC.1060907@rece.vub.ac.be> <55EEDD37.5090602@gmx.com> <55f072aa$0$1669$c3e8da3$5496439d@news.astraweb.com> <55f1a8df$0$1660$c3e8da3$5496439d@news.astraweb.com> <55f1c85d$0$1638$c3e8da3$5496439d@news.astraweb.com> X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ 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: 1441917023 news.xs4all.nl 23794 [2001:888:2000:d::a6]:49679 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:96302 On Thu, Sep 10, 2015, at 14:13, Steven D'Aprano wrote: > Because that's the definition of an expression in this context. An > expression is evaluated to either return a result, or raise an exception. Nonsense. An expression is something allowed within a larger expression. It's easy to imagine an expression allowing a subexpression that does not return a result. For example, in non-tail positions of something like C-comma/Lisp-progn. Or, for example, if a C-style "for" loop was an expression, the initializer and increment bits. This is semantics, to some extent - you could just as well say an expression may "return" a "result" that is a special non-value which transforms into an error if it's allowed to escape into a context where the value is needed (e.g. the argument to a function, a place a boolean is expected, being assigned to a variable) - C (and other C-family languages) has such a thing, Lisp does not.