Re: Suggestion for the PythonDevelopment for next version

2008-10-13 Thread Erik Max Francis
azrael wrote: I know that. enumerate is a great function. But this way it always adds some complexity. That objection doesn't really make sense. Your suggestion is far more complex: It requires that an `index` attribute be added to every element in an iteration. What's the lifetime of th

Re: Suggestion for the PythonDevelopment for next version

2008-10-13 Thread Terry Reedy
azrael wrote: I know that. enumerate is a great function. Agreed. Enumerate works everywhere an iterable is wanted. Just like other functions that produce iterables. A special trick for for-loops would only work for for-loops. -- http://mail.python.org/mailman/listinfo/python-list

Re: Suggestion for the PythonDevelopment for next version

2008-10-13 Thread azrael
case closed -- http://mail.python.org/mailman/listinfo/python-list

Re: Suggestion for the PythonDevelopment for next version

2008-10-13 Thread Kirk Strauser
At 2008-10-13T16:11:26Z, azrael <[EMAIL PROTECTED]> writes: > I know that. enumerate is a great function. But this way it always > adds some complexity. I think that it is more better to give a man a > better tool then to let him play with a not so good one. People like > Python because of his sim

Re: Suggestion for the PythonDevelopment for next version

2008-10-13 Thread Diez B. Roggisch
azrael wrote: > I know that. enumerate is a great function. But this way it always > adds some complexity. I think that it is more better to give a man a > better tool then to let him play with a not so good one. People like > Python because of his simplicity in comparison with c++. Maybe People >

Re: Suggestion for the PythonDevelopment for next version

2008-10-13 Thread azrael
I know that. enumerate is a great function. But this way it always adds some complexity. I think that it is more better to give a man a better tool then to let him play with a not so good one. People like Python because of his simplicity in comparison with c++. Maybe People would like him even more

Re: Suggestion for the PythonDevelopment for next version

2008-10-13 Thread Jean-Paul Calderone
On Mon, 13 Oct 2008 08:56:34 -0700 (PDT), azrael <[EMAIL PROTECTED]> wrote: You know, sometimes it annoys me to write a for loop in Python. If we use a list a=[1,2,3,4], and want to loop through it, Python offers the next option for i in a: print i 1 2 3 4 I love this. So simple and smooth.

Re: Suggestion for the PythonDevelopment for next version

2008-10-13 Thread Diez B. Roggisch
azrael wrote: > You know, sometimes it annoys me to write a for loop in Python. If we > use a list a=[1,2,3,4], and want to loop through it, Python offers the > next option for i in a: print i > 1 > 2 > 3 > 4 > > I love this. So simple and smooth. But what happens if we need also >

Suggestion for the PythonDevelopment for next version

2008-10-13 Thread azrael
You know, sometimes it annoys me to write a for loop in Python. If we use a list a=[1,2,3,4], and want to loop through it, Python offers the next option >>>for i in a: >>> print i >>> 1 2 3 4 I love this. So simple and smooth. But what happens if we need also the position of an object in a list.