Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!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.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'from:addr:yahoo.co.uk': 0.04; 'subject:Python': 0.06; 'explicit': 0.07; 'defines': 0.09; 'lawrence': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'shifting': 0.09; 'tismer': 0.09; 'python': 0.11; 'def': 0.12; 'bytecode': 0.16; 'count.': 0.16; 'foo():': 0.16; 'here"': 0.16; 'none.': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'roy': 0.16; 'sequence,': 0.16; 'statement.': 0.16; 'unreachable': 0.16; 'exception': 0.16; 'language': 0.16; 'wrote:': 0.18; '>>>': 0.22; 'programming': 0.22; 'print': 0.22; 'header:User-Agent:1': 0.23; 'second': 0.26; 'header:X-Complaints-To:1': 0.27; 'header:In-Reply-To:1': 0.27; 'function': 0.29; 'am,': 0.29; 'raise': 0.29; "doesn't": 0.30; 'statement': 0.30; 'code': 0.31; 'prints': 0.31; 'subject:with': 0.35; 'but': 0.35; 'there': 0.35; 'returning': 0.36; 'possible': 0.36; 'christian': 0.38; 'to:addr:python-list': 0.38; 'fact': 0.38; 'does': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'world.': 0.61; 'stand': 0.64; 'smith': 0.68; 'subject:your': 0.76; 'article': 0.77; 'game,': 0.84 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Mark Lawrence Subject: Re: Show off your Python chops and compete with others Date: Fri, 08 Nov 2013 09:23:30 +0000 References: <82328ec8-7178-4a17-abfe-13d444fab9cf@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: host-78-147-179-99.as13285.net User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 In-Reply-To: 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: 36 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1383902711 news.xs4all.nl 15891 [2001:888:2000:d::a6]:54529 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:58766 On 08/11/2013 02:18, Roy Smith wrote: > In article , alex23 > wrote: > >> On 8/11/2013 11:54 AM, Roy Smith wrote: >>> Dead code doesn't count. >> >> Neither do shifting goalposts. > > It's not a shifting goalpost. My original statement was that: > > def foo(): > raise Exception > > defines a function which 1) has no explicit return statement and 2) does > not return None. I stand by that statement. There is no possible > codepath, no possible calling sequence, no possible execution > environment, which will cause that function to return None. That fact > that one particular Python implementation happens to produce unreachable > bytecode for returning None is meaningless. Would you say that: > > def baz(): > return None > print "I got here" > > is a function which prints "I got here"? > Game, set and match to Roy Smith? :) -- Python is the second best programming language in the world. But the best has yet to be invented. Christian Tismer Mark Lawrence