Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!eweka.nl!lightspeed.eweka.nl!194.109.133.87.MISMATCH!newsfeed.xs4all.nl!newsfeed1.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; 'operator,': 0.09; 'received:151': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'skip:f 70': 0.09; 'python': 0.11; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'wrote:': 0.18; 'import': 0.22; 'header:User-Agent:1': 0.23; 'header:X-Complaints-To:1': 0.27; 'statement': 0.30; "i'm": 0.30; 'really,': 0.31; 'really': 0.36; 'received:it': 0.37; 'to:addr :python-list': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'received:libero.it': 0.84 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Vito De Tullio Subject: Re: Obfuscated factorial Date: Sun, 27 Oct 2013 08:28:21 +0100 References: <526badb4$0$29972$c3e8da3$5496439d@news.astraweb.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8Bit X-Gmane-NNTP-Posting-Host: ppp-146-55.26-151.libero.it User-Agent: KNode/4.11.2 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: 24 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1382858920 news.xs4all.nl 15941 [2001:888:2000:d::a6]:60205 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:57726 Joshua Landau wrote: > Python already supports the factorial operator, -ⵘ. why use ⵘ (TIFINAGH LETTER AYER YAGH) when you can have the BANG? 방 (HANGUL SYLLABLE BANG) > You just have to > import it. > > # Import statement > ⵘ = type("",(),{"__rsub__":lambda s,n:(lambda f,n:f(f,n))(lambda > f,z:round((2.5066282746310002*(z+0j+7.5)**(z+0.5)*2.718281828459045**(- z-7.5)*(0.99999999999980993+676.5203681218851/(z+1)-1259.1392167224028/(z+2)+771.32342877765313/(z+3)-176.61502916214059/(z+4)+12.507343278686905/(z+5)-0.13857109526572012/(z+6)+9.9843695780195716e-6/(z+7)+1.5056327351493116e-7/(z+8))).real)if > z>=0.5 else > 3.141592653589793/(__import__("math").sin(3.141592653589793*z)*f(f,1- z)),n)})() I'm really, really impressed! -- By ZeD