Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Dennis Lee Bieber Newsgroups: comp.lang.python Subject: Re: Undefined behaviour in C [was Re: The Cost of Dynamism] Date: Sun, 27 Mar 2016 18:31:56 -0400 Organization: IISS Elusive Unicorn Lines: 41 Message-ID: References: <87wpoq1omm.fsf@elektro.pacujo.net> <56f5f81d$0$1585$c3e8da3$5496439d@news.astraweb.com> <87io0a6j1w.fsf@nightsong.com> <56f67ee3$0$1583$c3e8da3$5496439d@news.astraweb.com> <87poug5t0c.fsf@nightsong.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de VwVuZDNGRbzod3GMmokqdQ6H2b+16WTUIi6P6h60lGMQ== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'value,': 0.03; 'used.': 0.05; '"who': 0.09; 'message-id:@4ax.com': 0.09; 'output,': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'thrown': 0.09; 'output': 0.13; 'def': 0.13; 'file,': 0.15; '2016': 0.16; '>unless': 0.16; 'discarded': 0.16; 'dummy': 0.16; 'invoking': 0.16; 'lhs': 0.16; 'received:80.91.229.3': 0.16; 'received:io': 0.16; 'received:plane.gmane.org': 0.16; 'received:psf.io': 0.16; 'url:home': 0.18; '>>>': 0.20; "we'd": 0.21; 'function,': 0.22; 'pass': 0.22; 'script': 0.25; "i've": 0.25; 'header:X-Complaints- To:1': 0.26; 'function': 0.28; 'idea': 0.28; 'mode.': 0.29; 'subject: [': 0.29; 'ones': 0.35; 'but': 0.36; 'keyword': 0.36; 'mode': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'received:org': 0.37; 'charset:us-ascii': 0.37; 'to:addr:python.org': 0.40; 'some': 0.40; 'subject:The': 0.61; 'lose': 0.63; 'different': 0.63; 'mar': 0.65; 'receive': 0.71; 'taken.': 0.84; 'dennis': 0.91; 'received:108': 0.93 X-Injected-Via-Gmane: http://gmane.org/ X-Gmane-NNTP-Posting-Host: 108.79.217.212 X-Newsreader: Forte Agent 6.00/32.1186 X-No-Archive: YES X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com comp.lang.python:105878 On Sun, 27 Mar 2016 15:43:33 +0100, BartC declaimed the following: > > fn # and other kinds of expression > >unless some keyword is used. (I've no idea what that might be; all the >best ones are taken. But I've already said a keyword can be emulated via >a dummy function call.) And the cost would be that we'd lose the interactive mode output >>> def junk(): ... pass ... >>> t = junk >>> t >>> That IS the return value of the uncalled function, which is thrown out in script mode. It is no different from invoking a function that returns a value, and not having a LHS to receive the value... >>> def junk2(): ... return "Who cares" ... >>> junk2() 'Who cares' >>> In a script file, both result in no output, and the return value is discarded silently. -- Wulfraed Dennis Lee Bieber AF6VN wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/