Range Operation pre-PEP
Roman Suzi
rnd at onego.ru
Wed May 9 14:20:29 EDT 2001
On Wed, 9 May 2001, Rainer Deyke wrote:
>"Bjorn Pettersen" <BPettersen at NAREX.com> wrote in message
>news:mailman.989423654.4836.python-list at python.org...
>> for i in 0 -> len(seq):
>> ...
>>
>> I still favor overloading range though...
>
>I favor leaving Python as-is, since this entire thread is about solving a
>non-problem.
The problem is not to make range(len(seq)) shorter, but
to make for loop easier to learn:
right now FUNCTIONS and LISTS are needed to understand
for loop. (Even recursion is "easier" with just FUNCTIONS
to know ;-)
So, I started the thread to:
1. Discuss if the raised problem is "no problem"
2. If the 1. is not true, to discuss syntactic solution.
We seem to drift to no. 2 without questioning no. 1.
>If you want a shorter way of writing 'range(len(x))', you can
>always write your own function. If there is really a need of such a
>function in '__builtin__', I would prefer that it have a new name. How
>about 'indexes'?
Sincerely yours, Roman Suzi
--
_/ Russia _/ Karelia _/ Petrozavodsk _/ rnd at onego.ru _/
_/ Wednesday, May 09, 2001 _/ Powered by Linux RedHat 6.2 _/
_/ "Always remember no matter where you go, there you are." _/
More information about the Python-list
mailing list