Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #45538

Re: Python for philosophers

References (2 earlier) <avaqo7Fsj3pU1@mid.individual.net> <519052df$0$29997$c3e8da3$5496439d@news.astraweb.com> <5e2c6b41-e9af-4604-ad05-47fbea32ae15@zo5g2000pbb.googlegroups.com> <mailman.1631.1368462293.3114.python-list@python.org> <52b7a255-51f2-4b62-9c99-f8fcda5b7e97@googlegroups.com>
Date 2013-05-19 10:04 +1000
Subject Re: Python for philosophers
From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.1824.1368921893.3114.python-list@python.org> (permalink)

Show all headers | View raw


On Sun, May 19, 2013 at 9:56 AM, 88888 Dihedral
<dihedral88888@googlemail.com> wrote:
> Hey, ChisA, are you delibrately to write a recursive version
> to demonstrate the stack depth problem in Python?
>
> def fact(n):
>    ret=1
>    if n>1: # integer checking is not used but can be added
>       for x in xrange(n): ret*=x
>    #print ret # debugging only for long integers
>    return ret
>
>
>
> In a 32 or 64 bit system, this non-recursive verssion
> will be limited by the heap space not by the stack limit.

And just when we're sure Dihedral's a bot, a post like this comes through.

Dihedral, are you intelligent? I'm still in two minds about this...
which may be why you so often appear to have no minds. I dunno.
Mathematics somewhere I fancy.

ChrisA

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: Python for philosophers Citizen Kant <citizenkant@gmail.com> - 2013-05-12 16:17 +0200
  Re: Python for philosophers Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-05-12 14:30 +0000
    Re: Python for philosophers alex23 <wuwei23@gmail.com> - 2013-05-12 21:19 -0700
  Re: Python for philosophers rusi <rustompmody@gmail.com> - 2013-05-12 09:00 -0700
  Re: Python for philosophers Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2013-05-13 12:34 +1200
    Re: Python for philosophers Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-05-13 02:41 +0000
      Re: Python for philosophers rusi <rustompmody@gmail.com> - 2013-05-13 07:53 -0700
        Re: Python for philosophers Chris Angelico <rosuav@gmail.com> - 2013-05-14 02:24 +1000
          Re: Python for philosophers rusi <rustompmody@gmail.com> - 2013-05-13 11:14 -0700
            Re: Python for philosophers Chris Angelico <rosuav@gmail.com> - 2013-05-14 04:22 +1000
          Re: Python for philosophers 88888 Dihedral <dihedral88888@googlemail.com> - 2013-05-18 16:56 -0700
            Re: Python for philosophers Chris Angelico <rosuav@gmail.com> - 2013-05-19 10:04 +1000
              Re: Python for philosophers 88888 Dihedral <dihedral88888@googlemail.com> - 2013-05-18 19:30 -0700
                Re: Python for philosophers Michael Torrie <torriem@gmail.com> - 2013-05-18 22:46 -0600
    Re: Python for philosophers Schneider <js@globe.de> - 2013-05-16 16:13 +0200
  Re: Python for philosophers Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-05-13 03:25 +0000
    Re: Python for philosophers Grant Edwards <invalid@invalid.invalid> - 2013-05-13 14:33 +0000
  Re: Python for philosophers Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-05-13 07:13 +0000
    Re: Python for philosophers alex23 <wuwei23@gmail.com> - 2013-05-13 02:05 -0700
    Re: Python for philosophers Neil Cerutti <neilc@norwich.edu> - 2013-05-13 13:52 +0000

csiph-web