Re: why generator assigned to slice?

2011-01-06 Thread ana sanchez
In Peter Otten <__pete...@web.de> writes: >ana sanchez wrote: >> i found this when i read the source of a program in python: >> >> self.__chunks[start:end] = (chunk for i in xrange(start, end)) >> what utility has to assign a generator to a slice???

why generator assigned to slice?

2011-01-05 Thread ana sanchez
hi!!! i found this when i read the source of a program in python: self.__chunks[start:end] = (chunk for i in xrange(start, end)) and also this: self.__lines[line:line] = (None for i in xrange(count)) what utility has to assign a generator to a slice??? ?the *final result*