Help understanding the decisions *behind* python?

sturlamolden sturlamolden at
Sun Aug 2 05:10:00 CEST 2009

On 2 Aug, 04:47, Nobody <nob... at> wrote:

> OTOH, using a "for" loop when you could use a generator means less work
> when you need to make a minor change and a generator is no longer
> sufficient.

It's not just that. It is e.g. using a for loop and indexes instead of
a slice. E.g.

for i in range(10): # Java idiom
   a[i] = b[i+1]

instead of

a[:10] = b[1:11] # Pythonic

More information about the Python-list mailing list