- saiyr
- May 23, 2004
-
|
Git posted:
Really though, Django might be overkill but it makes development fly by. I can't recommend it enough, but if you're absolutely certain that it won't suit, you might do well to look at the smaller frameworks like Pylons or CherryPy. Actually, you've a hell of a lot of frameworks you could choose from if any one doesn't suit.
Hmm, I don't really think Pylons is "small". It's small in the sense that you can swap out a lot of components, and the core code isn't really that big, but it's still very Rails-like/big. CherryPy is a bit more manageable. Web.py is pretty small as well. Reddit used it for one of their billions of rewrites and rewrote the entire site in a weekend or something.
|
#
¿
Nov 5, 2007 18:43
|
|
- Adbot
-
ADBOT LOVES YOU
|
|
#
¿
May 3, 2024 09:07
|
|
- saiyr
- May 23, 2004
-
|
my stepdads beer posted:
How do you reset an iterator in a for loop?
code:switch = True
for i in range(0, 5):
print i
if (i == 4) and (switch == True):
i = 0
switch = False
Why doesn't this loop twice?
I think you're stuck in C mode, where at the end of the loop you do i++. Python simply assigns the next value in the iterator to i until no values remain, which is why it doesn't loop twice. It's probably cleaner to put the number of repetitions you want in an outer loop, instead:
code:for j in range(2):
for i in range(5):
print i
|
#
¿
Oct 2, 2008 07:47
|
|