On 3/28/2012 8:16, Michael Poeltl wrote:
yeah - of course 'while True' was the first, most obvious best way... ;-)
but I was asked if there was a way without 'while True'
and so I started the 'recursive function'
and quick quick; RuntimeError-Exception -> not thinking much -> just adding
two z
hi,
* Dave Angel [2012-03-28 04:38]:
> On 03/27/2012 06:27 PM, Michael Poeltl wrote:
> >hi,
> >
> >can anybody tell why this 'little stupid *thing* of code' let's
> >python-3.2.2, 2.6.X or python 2.7.2 segfault?
> >
> >>>def get_steps2(pos=0, steps=0):
> >... if steps == 0:
> >... po
On 03/27/2012 06:27 PM, Michael Poeltl wrote:
hi,
can anybody tell why this 'little stupid *thing* of code' let's python-3.2.2,
2.6.X or python 2.7.2 segfault?
def get_steps2(pos=0, steps=0):
... if steps == 0:
... pos = random.randint(-1,1)
... if pos == 0:
... retur
Am 28.03.2012 00:27, schrieb Michael Poeltl:
> hi,
>
> can anybody tell why this 'little stupid *thing* of code' let's python-3.2.2,
> 2.6.X or python 2.7.2 segfault?
The code segfaults because you have increased the recursion limit. The
amount of recursions is limited by the stack size. A C pro
On Tue, Mar 27, 2012 at 3:27 PM, Michael Poeltl
wrote:
> hi,
>
> can anybody tell why this 'little stupid *thing* of code' let's python-3.2.2,
> 2.6.X or python 2.7.2 segfault?
>
>>> def get_steps2(pos=0, steps=0):
> ... if steps == 0:
> ... pos = random.randint(-1,1)
> ... if pos