Thanks, I cannot utilize the String Class completely. I'm a newbie for
python
2008/8/18 Gabriel Genellina <[EMAIL PROTECTED]>
> En Sun, 17 Aug 2008 21:57:46 -0300, Patrol Sun <[EMAIL PROTECTED]>
> escribió:
>
> > Of course We needn't 100 levels,but I use the exec function can concise
> the
> > co
I test the exec function. As we all know, we can set the recursive levels.
How to handle it?
2008/8/17 Fredrik Lundh <[EMAIL PROTECTED]>
> Patrol Sun wrote:
>
> when I use 20 for ,"SystemError: too many statically nested blocks"
>> When I use 100 for ,"IndentationError: too many levels of indent
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:python-
> [EMAIL PROTECTED] On Behalf Of Lie
> Sent: Monday, August 18, 2008 11:04 AM
> To: python-list@python.org
> Subject: Re: how many nested for can we utilize?
>
> On Aug 17, 4:23 pm, Fredrik Lundh &
On Aug 17, 4:23 pm, Fredrik Lundh <[EMAIL PROTECTED]> wrote:
> Patrol Sun wrote:
> > when I use 20 for ,"SystemError: too many statically nested blocks"
> > When I use 100 for ,"IndentationError: too many levels of indentation"
> > How to handle these errors?
>
> so why exactly are you trying to ne
En Sun, 17 Aug 2008 21:57:46 -0300, Patrol Sun <[EMAIL PROTECTED]> escribió:
> Of course We needn't 100 levels,but I use the exec function can concise the
> code. See the attachment.
Just a note on the attached code:
def isPro52Num(n):
s=[]
for i in range(1,7):
s.
I use the exec function. my code's levels are less than 3. BTW,Linus
Torvalds is NOT always right.
2008/8/18 Roel Schroeven <[EMAIL PROTECTED]>
> Nick Dumas schreef:
>
>> A good quote I read (I can't remember who it was from, though) is "If
>> you need more than three levels of indentation, then
Yes, I can solve the problem by recursive function. I guess Function Call
consume more resources than nested For. So I use the nested For by using
exec function.
2008/8/18 Paul Boddie <[EMAIL PROTECTED]>
> On 17 Aug, 19:36, Fredrik Lundh <[EMAIL PROTECTED]> wrote:
> >
> > and functions will solve
I found that the recursive function run very slowly
2008/8/18 Paul Boddie <[EMAIL PROTECTED]>
> On 17 Aug, 17:17, Fredrik Lundh <[EMAIL PROTECTED]> wrote:
> >
> > required reading:
> >
> >"The Effects of Moore's Law and Slacking on Large Computations"
> >http://arxiv.org/abs/astro-ph/9912
Of course We needn't 100 levels,but I use the exec function can concise the
code. See the attachment.
2008/8/17 Fredrik Lundh <[EMAIL PROTECTED]>
> Nick Dumas wrote:
>
> A good quote I read (I can't remember who it was from, though) is "If
>> you need more than three levels of indentation, then s
Nick Dumas schreef:
A good quote I read (I can't remember who it was from, though) is "If
you need more than three levels of indentation, then something is
seriously wrong with your code." Possibly Guido himself?
Linus Torvalds in the Linux kernel coding style document:
"[...] The answer to th
On 17 Aug, 19:36, Fredrik Lundh <[EMAIL PROTECTED]> wrote:
>
> and functions will solve the 40-billion year computation problem exactly
> how?
I was thinking more about the need to nest "for" statements to a depth
of 20 levels, which I imagine only arises on a "just in case" basis
for the inquirer
Paul Boddie wrote:
required reading:
"The Effects of Moore's Law and Slacking on Large Computations"
http://arxiv.org/abs/astro-ph/9912202
Or maybe this...?
http://docs.python.org/tut/node6.html#SECTION00660
and functions will solve the 40-billion year computation pro
On Sun, 17 Aug 2008 17:17:06 +0200, Fredrik Lundh wrote:
>>> it'll take approx 40 billion years to run the program.
>>
>> I guess that's exactly why the OP asks the question. He just wants
>> to start as soon as possible ;-)
>
> required reading:
>
>"The Effects of Moore's Law and Slacking on
On 17 Aug, 17:17, Fredrik Lundh <[EMAIL PROTECTED]> wrote:
>
> required reading:
>
>"The Effects of Moore's Law and Slacking on Large Computations"
>http://arxiv.org/abs/astro-ph/9912202
Or maybe this...?
http://docs.python.org/tut/node6.html#SECTION00660
And this:
http:
Wojtek Walczak wrote:
it'll take approx 40 billion years to run the program.
I guess that's exactly why the OP asks the question. He just wants
to start as soon as possible ;-)
required reading:
"The Effects of Moore's Law and Slacking on Large Computations"
http://arxiv.org/abs/astro-p
On Sun, 17 Aug 2008 16:39:26 +0200, Fredrik Lundh wrote:
>> A good quote I read (I can't remember who it was from, though) is "If
>> you need more than three levels of indentation, then something is
>> seriously wrong with your code." Possibly Guido himself? Anyway. If
>> you've got 100 levels of
Nick Dumas wrote:
A good quote I read (I can't remember who it was from, though) is "If
you need more than three levels of indentation, then something is
seriously wrong with your code." Possibly Guido himself? Anyway. If
you've got 100 levels of for, you're probably making things way harder
tha
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
A good quote I read (I can't remember who it was from, though) is "If
you need more than three levels of indentation, then something is
seriously wrong with your code." Possibly Guido himself? Anyway. If
you've got 100 levels of for, you're probably ma
Patrol Sun wrote:
when I use 20 for ,"SystemError: too many statically nested blocks"
When I use 100 for ,"IndentationError: too many levels of indentation"
How to handle these errors?
so why exactly are you trying to nest 20 or 100 for-in loops?
--
http://mail.python.org/mailman/listinfo/p
when I use 20 for ,"SystemError: too many statically nested blocks"
When I use 100 for ,"IndentationError: too many levels of indentation"
How to handle these errors?
--
http://mail.python.org/mailman/listinfo/python-list
20 matches
Mail list logo