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


Groups > comp.lang.python > #82877

Re: Program calling unwanted functions

Date 2014-12-22 19:12 -0500
From Dave Angel <davea@davea.name>
Subject Re: Program calling unwanted functions
References <b37a93ec-c90b-4375-a264-e96c3128871b@googlegroups.com> <5498808D.60305@davea.name> <CALwzidkPhDPVfw_Gx_cEDPvDmi=1mzda4uJ1HtcdwP39Cw1X_Q@mail.gmail.com> <mailman.17145.1419292640.18130.python-list@python.org> <02c018f7-d871-4b3c-abd4-0fca1fbe12c1@googlegroups.com>
Newsgroups comp.lang.python
Message-ID <mailman.17177.1419410427.18130.python-list@python.org> (permalink)

Show all headers | View raw


On 12/22/2014 07:04 PM, sohcahtoa82@gmail.com wrote:
>>>> def test(t):
> ...     print(t)
> ...     test(t+1)
> ...
>>>> test(1)
> 1
> 2
> 3
> 4
> <snip>
> 998
> 999
> Traceback (most recent call last):
>    File "<stdin>", line 1, in <module>
>    File "<stdin>", line 3, in test
>    File "<stdin>", line 3, in test
>    File "<stdin>", line 3, in test
> <snip>
>    File "<stdin>", line 3, in test
>    File "<stdin>", line 3, in test
> RuntimeError: maximum recursion depth exceeded
>
> Huh...there actually is a limit of about 1,000.  I'm assuming this is hard-coded?  I did a similar test with Java a while back and was getting different results every time.
>

https://docs.python.org/3.4/library/sys.html#sys.getrecursionlimit


-- 
DaveA

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


Thread

Program calling unwanted functions Luke Tomaneng <luketomaneng@gmail.com> - 2014-12-22 11:55 -0800
  Re: Program calling unwanted functions John Gordon <gordon@panix.com> - 2014-12-22 20:09 +0000
  Re: Program calling unwanted functions Dave Angel <davea@davea.name> - 2014-12-22 15:35 -0500
  Re: Program calling unwanted functions Ian Kelly <ian.g.kelly@gmail.com> - 2014-12-22 16:48 -0700
  Re: Program calling unwanted functions Dave Angel <davea@davea.name> - 2014-12-22 18:57 -0500
    Re: Program calling unwanted functions sohcahtoa82@gmail.com - 2014-12-22 16:04 -0800
      Re: Program calling unwanted functions Ian Kelly <ian.g.kelly@gmail.com> - 2014-12-22 17:12 -0700
      Re: Program calling unwanted functions Dave Angel <davea@davea.name> - 2014-12-22 19:12 -0500

csiph-web