redho home | products | services
Web Design Forums

Web Design Forums  


Web Hosting, Web Design, Software and Web Development Forums  
 FAQFAQ   MemberlistArchive  Log inLog in   RegisterRegister 
         

maximum recursion depth of Phyton


Goto page 1, 2  Next
 
Post new topic   Reply to topic    Web Design Forums -> Python programming forum
View previous topic :: View next topic  
Author Message
trefeda



Joined: 21 Jun 2006
Posts: 6
What's Python's maximum recursion depth?
  Reply with quote


Peter Pitt



Joined: 20 May 2006
Posts: 114
Location: Egypt
Depends on the platform.
  Reply with quote
trefeda



Joined: 21 Jun 2006
Posts: 6
Windows and Linux?
  Reply with quote
Peter Pitt



Joined: 20 May 2006
Posts: 114
Location: Egypt
trefeda, the default is easily gotten with sys.getrecursionlimit(). howmuch beyond that you can go depends on many factors. And if you set the stacklimit manually, it depends on both the C stack limit and the size of the frames you create.
  Reply with quote
trefeda



Joined: 21 Jun 2006
Posts: 6
Wow, the default's only 1000. I didn't realize it was that low.
  Reply with quote
martinar_kauaro



Joined: 18 Jun 2006
Posts: 4
trefeda, are you doing something that's running into the limit?
  Reply with quote
trefeda



Joined: 21 Jun 2006
Posts: 6
Why does Python have a fixed stack size? Why not make it arbitrarily resizable?
  Reply with quote
rczywkkki



Joined: 14 May 2006
Posts: 1
trefeda: the stack size isn't Python's limitation, but the platform's.
  Reply with quote
Peter Pitt



Joined: 20 May 2006
Posts: 114
Location: Egypt
trefeda, unfortunately, there isn't a usable way to detect you're nearing the end of the platform stack size (except, apparently, on Windows).
  Reply with quote
trefeda



Joined: 21 Jun 2006
Posts: 6
martinar_kauaro, Not yet. I'm just considering how I might implement a tree search algorithm.
  Reply with quote
Page 1 of 2 Goto page 1, 2  Next
Post new topic   Reply to topic    Web Design Forums -> Python programming forum


Dubai Forums - Expat Help | Vegan Chat | Java Programming | Free 3D tutorials and 3d textures | Paris Forum | EU Forum
Free Dubai Classifieds | Free London Classifieds | Jobs in London

High Quality, Custom 3d animation and Web Design solutions Royal Quality Web Hosting Services Vegetarian and Animal Rights news

Powered by phpBB © 2001, 2005 phpBB Group