Re: Re: Django Python roop

2014-06-11 Thread Javier Guerra Giraldez
On Wed, Jun 11, 2014 at 8:12 AM, moqianc...@gmail.com wrote: > write right code, write clean code, It's a basic rule for our develope > work. for that you have to learn what the code means. "while x !=[]:" will always be an endless loop. the "[]" doesn't do what you think. -- Javier -- Yo

Re: Django Python roop

2014-06-11 Thread hito koto
Ok, thank you! 2014年6月11日水曜日 21時52分54秒 UTC+9 Qiancong: > >  > Hi, hito koto: > I think the problems you asked should be post in python-lang mail-list. > For python program, I prefer "for", not "while"; It's more simpler. > But if you like while, I think the following code maybe helpful: >

Re: Django Python roop

2014-06-11 Thread Erik Cederstrand
Den 11/06/2014 kl. 14.49 skrev hito koto : > MemoryError , Why? idon't know. > I try this have Traceback (most recent call last): > File "", line 1, in > File "", line 5, in foo > MemoryError errors: > > I'm change to this code: have the Memory Error, > > def foo(x): > y = [] > wh

Re: Re: Django Python roop

2014-06-11 Thread moqianc...@gmail.com
Sometimes, I have to use while statement too. But any time, I think write right code, write clean code, It's a basic rule for our develope work. moqianc...@gmail.com From: hito koto Date: 2014-06-11 21:05 To: django-users Subject: Re: Django Python roop Hi, qiancong: Thank you, Do yo

Re: Re: Django Python roop

2014-06-11 Thread moqianc...@gmail.com
From: hito koto Date: 2014-06-11 20:49 To: django-users Subject: Re: Django Python roop MemoryError , Why? idon't know. I try this have Traceback (most recent call last): File "", line 1, in File "", line 5, in foo MemoryError errors: I'm change to this code: h

Re: Django Python roop

2014-06-11 Thread hito koto
Hi, qiancong: Thank you, Do you not use the while statement to Django? 2014年6月11日水曜日 21時52分54秒 UTC+9 Qiancong: > >  > Hi, hito koto: > I think the problems you asked should be post in python-lang mail-list. > For python program, I prefer "for", not "while"; It's more simpler. > But if you

Re: Django Python roop

2014-06-11 Thread hito koto
hi, Ilya Kazakevich: I would like to change the while statement from the for statement 2014年6月11日水曜日 21時49分32秒 UTC+9 hito koto: > > MemoryError , Why? idon't know. > I try this have Traceback (most recent call last): > File "", line 1, in > File "", line 5, in foo > MemoryError errors: > >

Re: Django Python roop

2014-06-11 Thread moqianc...@gmail.com
Hi, hito koto: I think the problems you asked should be post in python-lang mail-list. For python program, I prefer "for", not "while"; It's more simpler. But if you like while, I think the following code maybe helpful: def fff(x): y = [] i = 0 xlen = len(x) while i< xlen: y.append(x[i]) i +=

Re: Django Python roop

2014-06-11 Thread hito koto
MemoryError , Why? idon't know. I try this have Traceback (most recent call last): File "", line 1, in File "", line 5, in foo MemoryError errors: I'm change to this code: have the Memory Error, def foo(x): y = [] while x != []: for i in range(len(x)): y.append(

RE: Django Python roop

2014-06-11 Thread Ilya Kazakevich
Hello, What are you trying to do? Split string? Copy array? You probably need to use builtin functions for that. Ilya Kazakevich, JetBrains PyCharm (Best Python/Django IDE) http://www.jetbrains.com/pycharm/ "Develop with pleasure!" >-Original Message- >From: django-users@googlegroups.