Re: [Tutor] Maximum recursion depth problem.

2010-08-03 Thread Wesley Brooks
Morning Peter, Thanks, that was something I was unaware of! Not sure how I hadn't bumped into that before! Cheers, Wesley. On 3 August 2010 11:40, Peter Otten <__pete...@web.de> wrote: > Wesley Brooks wrote: > >> I'm having real difficulty understanding why the following is not >> working and h

Re: [Tutor] Maximum recursion depth problem.

2010-08-03 Thread Peter Otten
Wesley Brooks wrote: > I'm having real difficulty understanding why the following is not > working and hoped I've either missed something obvious of I'm doing > something wrong! > > class A: > def break_down(self, value, base, broken_list=[]): > I'm a little stumped as I don't think I'm usin

Re: [Tutor] Maximum recursion depth problem.

2010-08-03 Thread Wesley Brooks
Ok a little more investigation has found the follwing work but there not as tidy. I'd still really appreciate someone explaing why this behaves like this! class A: def break_down(self, value, base, broken_list=[]): power = len(broken_list) digit = (value % (base ** (power + 1))) /

[Tutor] Maximum recursion depth problem.

2010-08-03 Thread Wesley Brooks
Dear Python Users, I'm having real difficulty understanding why the following is not working and hoped I've either missed something obvious of I'm doing something wrong! class A: def break_down(self, value, base, broken_list=[]): power = len(broken_list) digit = int((value % (