Path: csiph.com!usenet.pasdenom.info!news.redatomik.org!newsfeed.xs4all.nl!newsfeed1a.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.035 X-Spam-Evidence: '*H*': 0.93; '*S*': 0.00; 'output': 0.05; 'say,': 0.05; 'calculating': 0.09; 'latter': 0.09; 'python': 0.11; '2.7': 0.14; 'debated': 0.16; 'expression,': 0.16; 'interpreter,': 0.16; 'loop.': 0.16; 'repr()': 0.16; 'subject:generation': 0.16; 'wrote:': 0.18; 'header:User-Agent:1': 0.23; 'integer': 0.24; 'sorry,': 0.24; 'long,': 0.26; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; 'character': 0.29; 'getting': 0.31; 'flags': 0.31; 'but': 0.35; 'two': 0.37; 'to:addr:python-list': 0.38; 'rather': 0.38; 'sure': 0.39; 'to:addr:python.org': 0.39; 'even': 0.60; 'dave': 0.60; 'march': 0.61; 'close': 0.67; 'received:74.208': 0.68; 'obvious': 0.74; '2015': 0.84; 'end.': 0.84; 'received:74.208.4.194': 0.84; 'angel': 0.91; 'notorious': 0.91 Date: Fri, 06 Mar 2015 11:30:08 -0500 From: Dave Angel User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: python-list@python.org Subject: Re: Speeding up permutations generation References: <201503060532.03842.gheskett@wdtv.com> <54F98DFA.4090503@davea.name> <201503061114.06957.gheskett@wdtv.com> In-Reply-To: <201503061114.06957.gheskett@wdtv.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:HI2zaYvXuckWC5VnBYhhKY7hp717kHT0AFhjtWZa4LlvfCsUD2x 8NSsv8lZrc3C2R8GVwQ66BLGJ27W60m0axYK1oCPoBbjgfCTlQ7TGHfKcuXrdD0BzD1cj5f Afs3r80T/s/g8/xR6Od/oad/hPjkFka22n2JkH+89tYNcchWdahDYX52jmIW+Vt1fc6Z/Tr 16ZV+aoMHu+zkyfBYXqAA== X-UI-Out-Filterresults: notjunk:1; X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.19 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: 25 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1425659413 news.xs4all.nl 2836 [2001:888:2000:d::a6]:47775 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:87037 On 03/06/2015 11:14 AM, Gene Heskett wrote: > > > On Friday 06 March 2015 06:22:34 Dave Angel wrote: >> >> Sorry, but 50! is not even close to 50**50. The latter is 85 digits >> as you say, but 50! is "only" 64. >> >> >> 30414093201713378043612608166064768844377641568960512000000000000L > > What utility output that as an L ? > Python 2.7 interpreter, after calculating factorial with the obvious loop. Basically, it's using repr() on the expression, so it flags the integer as a long, rather than an int. I debated not including it, but this way I was sure of getting the right number of zeroes. My copy/paste is notorious for missing a character or two at each end. -- DaveA