Path: csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed5.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.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; '(except': 0.05; 'function,': 0.07; 'omit': 0.07; 'python': 0.09; 'callable': 0.09; 'def': 0.10; 'language': 0.14; "can't.": 0.16; 'class),': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'subject:import': 0.16; 'wrote:': 0.17; 'thu,': 0.17; 'received:209.85.214.174': 0.21; 'statement': 0.23; 'header:In- Reply-To:1': 0.25; 'am,': 0.27; 'functions.': 0.27; 'message- id:@mail.gmail.com': 0.27; 'rest': 0.28; 'no,': 0.29; 'could': 0.32; 'to:addr:python-list': 0.33; 'received:google.com': 0.34; 'pm,': 0.35; 'received:209.85': 0.35; 'michael': 0.36; 'flow': 0.36; 'why': 0.37; 'received:209': 0.37; 'subject:: ': 0.38; 'to:addr:python.org': 0.39; 'received:209.85.214': 0.39; 'little': 0.39; 'header:Received:5': 0.40; '26,': 0.65; 'jul': 0.65 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:to :content-type; bh=j1MptS9+ChXIgS5QSJOe51BSOqN0VonqbUQ+q8Ql7qY=; b=GbS1369k5nmpznDvBI95+pOk3pyTYOQcdsH0AhStfufdZ8pUD8KOE3jc1s1ahZ+JKi bkKpNsgTS8SpRppPQBdgtk0dHtmwW6UzvOnOux+qno49hFYXqxBn/+gNVd2cna1eaAEG KM9tHm6gB8m4nPI7VSDBLishBngozX6Mr8+hXWZl0h9UsbTiljuXl5jCEvsyjK9+Jxuc P+ciRZ+1ErOjUohlneqfBu+11rVHzLq6T+KoqQ+0HnTWBTCjGQ/RTPc+1IKoGWApF4fJ JcNFtzpiECcB12yVltP56ZGae0582nvq2ShbDfKUDueqjrmq2CpqveuHhEV730HvnPHS vTEg== MIME-Version: 1.0 In-Reply-To: References: Date: Thu, 26 Jul 2012 19:42:11 +1000 Subject: Re: from future import pass_function From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 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: 17 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1343295734 news.xs4all.nl 6985 [2001:888:2000:d::a6]:48822 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:26075 On Thu, Jul 26, 2012 at 7:16 PM, Devin Jeanpierre wrote: > On Thu, Jul 26, 2012 at 1:20 AM, Michael Hrivnak wrote: >> If we want pass(), then why not break() and continue()? And also >> def() and class()? for(), while(), if(), with(), we can make them all >> callable objects! > > No, you actually can't. > > You omit the one control flow statement that could actually be turned > into a function, raise. None of the rest could in Python (except > class), and one of the rest couldn't in any language (def). Well, if/while/for could be functions. So could with, probably. Now, def would be a little tricky... ChrisA