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
st do as following: > *y = x[:]* > > python is a power & beautiful language, > please read the https://docs.python.org/2/tutorial/ at first like > François said. > > With Regards. > > ------ > moqia...@gmail.com > > *Fr

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
--------- > moqia...@gmail.com > > *From:* hito koto > *Date:* 2014-06-11 19:21 > *To:* django-users > *Subject:* Django Python roop > Hello, all > > I want to change to while statement from for statement, so how can i do > to? > > this is my

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
nc...@gmail.com From: hito koto Date: 2014-06-11 19:21 To: django-users Subject: Django Python roop Hello, all I want to change to while statement from for statement, so how can i do to? this is my correct for statement codes: def fff(x): y = [] for i in range(len(x)): y.appen

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
om: django-users@googlegroups.com >[mailto:django-users@googlegroups.com] On Behalf Of hito koto >Sent: Wednesday, June 11, 2014 3:22 PM >To: django-users@googlegroups.com >Subject: Django Python roop > >Hello, all > >I want to change to while statement from for statement, so how can i do

Django Python roop

2014-06-11 Thread hito koto
Hello, all I want to change to while statement from for statement, so how can i do to? this is my correct for statement codes: def fff(x): y = [] for i in range(len(x)): y.append(x[i]) return y and i want change to while statement So, this code have erroes: TypeError: list